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
ruckus / gist:46971c704ee428c6f180
Created Jul 7, 2014
Implementing item_based_expense_line_detail
View gist:46971c704ee428c6f180
diff --git a/lib/quickbooks-ruby.rb b/lib/quickbooks-ruby.rb
index dbf6a6e..51fb518 100644
--- a/lib/quickbooks-ruby.rb
+++ b/lib/quickbooks-ruby.rb
@@ -29,6 +29,7 @@ require 'quickbooks/model/discount_line_detail'
require 'quickbooks/model/discount_override'
require 'quickbooks/model/payment_line_detail'
require 'quickbooks/model/account_based_expense_line_detail'
+require 'quickbooks/model/item_based_expense_line_detail'
require 'quickbooks/model/linked_transaction'
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",

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 /
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(;
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"/>
View gist:103419
doc = ConvertableDocument.find(params[:id])
redirect_to(:action => :index) and return
View gist:125980
ooga@web12 ext $ sudo ruby extconf.rb
checking for curl-config... yes
checking for curlinfo_redirect_time... yes
checking for curlinfo_response_code... yes
checking for curlinfo_filetime... yes
checking for curlinfo_redirect_count... yes
checking for curlinfo_os_errno... no
checking for curlinfo_num_connects... no
checking for curlinfo_ftp_entry_path... no
checking for curl_version_ssl... yes
View gist:166249
class ExpiresXHRRequests
def initialize(app)
@app = app
def call(env)
is_xhr = env['HTTP_X_REQUESTED_WITH'] == 'XMLHttpRequest'
status, headers, body =
if is_xhr && !headers.has_key?('Expires') # only set if NOT already set
headers['Expires'] = "#{one_week_ago.strftime('%a, %d %b %Y %H:%M:%S GMT')}"
View gist:227407
<cfcomponent output="yes">
<!--- Take an object and a struct as input. Traverse through the object's meta-data and
find all methods and if the datastruct contains a key which matches that method name (with "set" prepended)
then call that method using the struct key value.
This is a convenient way to quickly populate an object/bean by calling all of its
You can’t perform that action at this time.