Skip to content

Instantly share code, notes, and snippets.

View jcalvert's full-sized avatar

Jonathan Calvert jcalvert

View GitHub Profile
curl -v "https://maps.googleapis.com/maps/api/place/search/json?sensor=true&key=censored&location=38.897,-77.036&radius=&language=en-US&name=Starbucks&rankby=prominence&types="
*snip*
< HTTP/1.1 200 OK
< Content-Type: application/json; charset=UTF-8
< Date: Tue, 09 Oct 2012 22:17:25 GMT
< Server: mafe
< Cache-Control: private
< X-XSS-Protection: 1; mode=block
module MethodPair
def method_accessor(var, &block)
define_method("set_#{var}",block)
define_method(var) do
var_name = var.to_s.gsub(/\?/,'')
insvar = instance_variable_get("@#{var_name}")
unless insvar
insvar = self.send("set_#{var}")
instance_variable_set("@#{var_name}", insvar)
Variable_name Value
auto_increment_increment 1
auto_increment_offset 1
autocommit ON
automatic_sp_privileges ON
back_log 50
basedir /usr/local/mysql
big_tables OFF
binlog_cache_size 32768
binlog_direct_non_transactional_updates OFF
@jcalvert
jcalvert / gist:10291195
Created April 9, 2014 16:50
trace from hang
from /home/travis/.rvm/gems/ruby-1.9.3-p545/gems/test-unit-2.5.5/lib/test/unit.rb:502:in `block (2 levels) in <top (req
uired)>'
from /home/travis/.rvm/gems/ruby-1.9.3-p545/gems/test-unit-2.5.5/lib/test/unit/autorunner.rb:59:in `run'
from /home/travis/.rvm/gems/ruby-1.9.3-p545/gems/test-unit-2.5.5/lib/test/unit/autorunner.rb:408:in `run'
from /home/travis/.rvm/gems/ruby-1.9.3-p545/gems/test-unit-2.5.5/lib/test/unit/autorunner.rb:465:in `change_work_direct
ory'
from /home/travis/.rvm/gems/ruby-1.9.3-p545/gems/test-unit-2.5.5/lib/test/unit/autorunner.rb:409:in `block in run'
from /home/travis/.rvm/gems/ruby-1.9.3-p545/gems/test-unit-2.5.5/lib/test/unit/ui/testrunnerutilities.rb:24:in `run'
from /home/travis/.rvm/gems/ruby-1.9.3-p545/gems/test-unit-2.5.5/lib/test/unit/ui/testrunner.rb:25:in `start'
from /home/travis/.rvm/gems/ruby-1.9.3-p545/gems/test-unit-2.5.5/lib/test/unit/ui/testrunner.rb:40:in `start_mediator'
** [out :: iego.dca1.rws] [04/11/14 18:20:20 +0000 iego.dca1.rws (17308)] INFO : Reporting to: https://rpm.newrelic.com/accounts/187668/applications/1643760
** [out :: iego.dca1.rws] [04/11/14 18:24:21 +0000 iego.dca1.rws (21190)] INFO : Reporting to: https://rpm.newrelic.com/accounts/187668/applications/1643760
** [out :: iego.dca1.rws] [04/11/14 18:41:19 +0000 iego.dca1.rws (37814)] INFO : Reporting to: https://rpm.newrelic.com/accounts/187668/applications/1643760
** [out :: iego.dca1.rws] [04/11/14 18:45:25 +0000 iego.dca1.rws (41767)] INFO : Reporting to: https://rpm.newrelic.com/accounts/187668/applications/1643760
** [out :: iego.dca1.rws] [04/11/14 18:49:32 +0000 iego.dca1.rws (46047)] INFO : Reporting to: https://rpm.newrelic.com/accounts/187668/applications/1643760
** [out :: iego.dca1.rws] [04/11/14 18:54:35 +0000 iego.dca1.rws (50924)] INFO : Reporting to: https://rpm.newrelic.com/accounts/187668/applications/1643760
** [out :: iego.dca1.rws] [04/11/14 19:07:35 +0000 iego.dca1.rws (66131)] I
---
before_install:
- sudo apt-get install libgeos-dev
- gem update --system 1.8.25
- "echo 'gem: --no-ri --no-rdoc' > ~/.gemrc"
- gem install bundler
before_script:
- mysql -e 'create database rc_test; create database rc_fleet_test; create database rc_real_time_test;'
- bundle exec rake db:test:refresh
branches:
build_package_reconfigure() {
test -f configure || autoconf
}
build_package_patch_ruby_railsexpress() {
fetch_git rvm-patchsets git://github.com/skaes/rvm-patchsets.git master
patch -p1 < rvm-patchsets/patches/ruby/2.1.0/railsexpress/01-zero-broken-tests.patch
patch -p1 < rvm-patchsets/patches/ruby/2.1.0/railsexpress/02-improve-gc-stats.patch
patch -p1 < rvm-patchsets/patches/ruby/2.1.0/railsexpress/03-display-more-detailed-stack-trace.patch
@jcalvert
jcalvert / gist:542d4fb98c321f024256
Last active December 28, 2019 22:51
To Install libwkhtmltox

##To Install libwkhtmltox

  • Clone the wkhtmltopdf repo git clone --recursive https://github.com/wkhtmltopdf/wkhtmltopdf.git
  • You need the fpm gem to install sudo gem install fpm --no-ri --no-rdoc - it will be installed in /usr/bin so make sure that's in your path.
  • Checkout the latest release tag IE git checkout tags/0.12.2.
  • In the directory and run scripts/build.py osx-cocoa-x86-64(this will take a while! You're building Qt)
  • If you get an error like: error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/install_name_tool: can't open file: bin/libwkhtmltox.0.12.2.2.dylib (No such file or directory) all you need to do is match the version in the VERSION file in the base directory to the number between libwkhtmltox. and .dylib of the compiled file in static-build/osx-cocoa-x86-64/app/bin
  • If you're not on OS X, refer to INSTALL.md in the wkhtmltopdf repo for build instructions.
┬─┬ノ(ಠ_ಠノ)
@jcalvert
jcalvert / client.rb
Last active December 15, 2015 02:15
celluloid tcp client
require 'celluloid/current'
require 'celluloid/io'
class MyClient
include Celluloid::IO
finalizer :close_connection
def initialize(channel_id, host, port)
raise ArgumentError.new("Valid host and port required!") unless !host.nil? && !port.nil?
@channel_id = channel_id