Skip to content

Instantly share code, notes, and snippets.

Cody Caughlan ruckus

Block or report user

Report or block ruckus

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
MONTH=`date +"%Y-%m"`
DAY=`date +"%d"`
THISHOUR=`date +"%H"`
TIMESTAMP=`date +"%Y-%m-%d"`
echo "Start: postgresql.log.${TIMESTAMP}"
ruckus / mailer_recipient_override.rb
Created Sep 9, 2016
Place in `config/initializers/mailer_recipient_override.rb` and be sure to define an environment variable for `EMAIL_RECIPIENT_OVERRIDE`
View mailer_recipient_override.rb
class OverrideMailReciptient
def self.delivering_email(mail)
if Rails.env.development?
mail.subject = "[DEVELOPMENT] #{mail.subject} - Recipient: #{original_to}"
if &&
new_body = "#{mail.body}\n\nRemoved CC: recipients: #{", ")}"
mail.body = new_body = []
TextView mDistributor;
TextView mStatus;
TextView mOrderDate;
TextView mPickupDate;
TextView mDeliveryDate;
ruckus / generate_butterknife_binds.rb
Created Sep 30, 2015
Auto-generate ButterKnife @Bind calls
View generate_butterknife_binds.rb
require 'rubygems'
require 'nokogiri'
xml = Nokogiri::XML([0]))
class String
def camel_case
return self if self !~ /_/ && self =~ /[A-Z]+.*/
View axlsx_freeze_pane.rb
sheet.sheet_view do |sv|
sv.pane do |pane|
pane.top_left_cell = 'B1'
pane.state = :frozen
pane.x_split = 1
pane.active_pane = :top_right
View sheet1.xml
<sheetView windowProtection="false" tabSelected="false" showWhiteSpace="false" showOutlineSymbols="false" showFormulas="false" rightToLeft="false" showZeros="true" showRuler="true" showRowColHeaders="true" showGridLines="true" defaultGridColor="true" zoomScale="100" workbookViewId="0" zoomScaleSheetLayoutView="0" zoomScalePageLayoutView="0" zoomScaleNormal="0">
<pane topLeftCell="B1" state="frozen" activePane="topRight" ySplit="0" xSplit="1"/>
ruckus / rds_download_logfiles.rb
Created Jan 9, 2015
Ruby script to download log files from RDS and archive to S3.
View rds_download_logfiles.rb
This script uses the AWS v2 API
source ""
gem "aws-sdk", "2.0.17.pre"
ruckus /
Created Sep 25, 2014
Example of using a ViewPager as a Header in a ListView. We need to explicitly set the layout params of the Header view because its not known at initialization time, in my case I am asynchronously loading images into the ViewPager.
public class ProductDetailActivity extends FragmentActivity {
protected void onCreate(Bundle savedInstanceState) {
final DisplayMetrics displayMetrics = new DisplayMetrics();
final int width = displayMetrics.widthPixels;
mListView = (ListView)findViewById(;

Keybase proof

I hereby claim:

  • I am ruckus on github.
  • I am toolbag ( on keybase.
  • I have a public key whose fingerprint is E0A2 B6E5 3211 66F3 C462 ADC6 90E5 F40B 708B A52A

To claim this, I am signing this object:

ruckus / gist:747c702d7ab7f4243c69
Created Aug 1, 2014
Sample result of QBO AgedReceivables report
View gist:747c702d7ab7f4243c69
"Header": {
"Time": "2014-07-01T08:51:36-07:00",
"ReportName": "AgedReceivables",
"StartPeriod": "2014-08-01",
"EndPeriod": "2014-08-01",
"Currency": "USD",
"Option": [
"Name": "report_date",
You can’t perform that action at this time.