Connecting Ruby on Rails to multiple databases

It's not dicussed very often, but it is possible to connect a Ruby on Rails app to multiple backend databases. This, paired with the importation of a pre-existing data as outlined in a previous blog post,  is useful in scenarios where your application is required to read data from a shared databases populated by another … Continue reading Connecting Ruby on Rails to multiple databases

Nugget Post : Beyond basic SED

Interesting problem to solve with sed. Given the following file: [firstCompany-1-restricted-internal] exten => _1XX,1,Goto,(from-internal,${EXTEN},1) exten => _881XX,1,Goto(from-internal,${EXTEN},1) exten => _XXX,1,Goto(app-blackhole,congestion,1) exten => _XXXXX,1,Goto(app-blackhole,congestion,1) exten => _9XXXX.,1,Dial(SIP/BRI_1_OUT/${EXTEN},60) exten => h,1,Hangup() [secondCompany-2-restricted-internal] exten => _2XX,1,Goto,(from-internal,${EXTEN},1) exten => _882XX,1,Goto(from-internal,${EXTEN},1) exten => _XXX,1,Goto(app-blackhole,congestion,1) exten => _XXXXX,1,Goto(app-blackhole,congestion,1) exten => _[*0-9]!,1,Set(restprefix=1001992) exten => _[*0-9]!,1,Goto(from-internal,${restprefix}${EXTEN},1) exten => h,1,Hangup() We'd like to be … Continue reading Nugget Post : Beyond basic SED