Skip to content

Instantly share code, notes, and snippets.

View zackchandler's full-sized avatar

Zack Chandler zackchandler

  • Urbandoor
  • San Francisco Bay Area
View GitHub Profile
def parameterize(xml)
xml.gsub!('{iterator}', iterator_id.blank? ? 'Start' : 'Continue')
xml.gsub!('{iterator_id}', iterator_id || '')
xml.gsub!('{from_modified_date}', ((transactions_last_synced_on || 10.years.ago) - 1.day).to_s(:qb_date))
xml.gsub!('{to_modified_date}', (Time.now + 1.day).to_s(:qb_date))
xml
end
openssl genrsa -out example.key 1024
openssl req -new -key example.key -out example.csr
cat example.com.crt >> example.com.merged.crt
cat intermediate_bundle.crt >> example.com.merged.cert
<?xml version="1.0"?>
<qdbapi>
<action>API_GrantedDBs</action>
<errcode>0</errcode>
<errtext>No error</errtext>
<databases>
<dbinfo>
<dbname>Larry's Landscaping &amp; Garden Supply</dbname>
<dbid>bdujgmmn8</dbid>
</dbinfo>
<?xml version="1.0" ?>
<qdbapi>
<action>API_GetSchema</action>
<errcode>24</errcode>
<errtext>Invalid Application Token</errtext>
<errdetail>An Application Token must be supplied.</errdetail>
</qdbapi>
<databases>
...
<dbinfo>
<dbname>test1</dbname>
<dbid>bduuve7a5</dbid>
</dbinfo>
<dbinfo>
<dbname>Larry's Landscaping & Garden Supply</dbname>
<dbid>b34jgmmn8</dbid>
</dbinfo>
set :application, 'myproject'
set :domain, 'myproject.com'
set :deploy_to, "/var/www/apps/#{application}"
set :scm, :git
set :deploy_via, :remote_cache
set :repository, "zackchandler@depixelate.com:/git/#{application}.git"
set :use_sudo, false
begin
require 'minigems'
rescue LoadError
require 'rubygems'
end
if File.directory?(gems_dir = File.join(Dir.pwd, 'gems')) ||
File.directory?(gems_dir = File.join(File.dirname(__FILE__), '..', 'gems'))
$BUNDLE = true; Gem.clear_paths; Gem.path.unshift(gems_dir)
end
<VirtualHost *:80>
ServerName www.myproject.com
DocumentRoot /var/www/apps/myproject/current
</VirtualHost>
# works
require 'rest_client'
# broken
dependency 'rest-client'
# broken
dependency 'rest_client'
# broken