Skip to content

Instantly share code, notes, and snippets.

View jcalvert's full-sized avatar

Jonathan Calvert jcalvert

View GitHub Profile
@jcalvert
jcalvert / debug_output.log
Last active November 29, 2018 05:04
fail_greeter output
D0313 13:02:59.116947506 23841 is_epollexclusive_available.cc:83] epoll_ctl with EPOLLEXCLUSIVE | EPOLLONESHOT succeeded. This is evidence of no EPOLLEXCLUSIVE support. Not using epollex polling engine.
I0313 13:02:59.117012639 23841 ev_epollex_linux.cc:1482] Skipping epollex because it is not supported.
I0313 13:02:59.117025034 23841 ev_epoll1_linux.cc:114] grpc epoll fd: 7
D0313 13:02:59.117047422 23841 ev_posix.cc:140] Using polling engine: epoll1
D0313 13:02:59.117135413 23841 dns_resolver.cc:331] Using native dns resolver
D0313 13:02:59.117158235 23841 timer_manager.cc:85] Spawn timer thread
I0313 13:02:59.117215775 23841 init.cc:153] grpc_init(void)
D0313 13:02:59.117380384 23844 timer_generic.cc:637] TIMER CHECK BEGIN: now=0 next=9223372036854775807 tls_min=0 glob_min=0
I0313 13:02:59.117425596 23841 completion_queue.cc:433] grpc_completion_queue_create_internal(completion_type=0, polling_type=0)
D0313 13:02:59.117426687 23844 t
@jcalvert
jcalvert / const_to_class.rb
Created June 15, 2016 20:38
constants to class methods
constants(false).reject{|symbol| symbol.to_s =~ /[a-z]/}.each do |constant|
name = constant.to_s.downcase.gsub(/_name/, '')
var_name = "@#{name}"
define_singleton_method(name) do
unless instance_variable_defined?(var_name)
instance_variable_set(var_name, find_by(:name => const_get(constant)))
end
instance_variable_get(var_name)
end
end
@jcalvert
jcalvert / deploy.rb
Created June 9, 2016 14:52
deploy button ruby code
require 'aws-sdk'
queue = 'https://sqs.us-east-1.amazonaws.com/somerandomamazonnumber/deploybutton'
poller = Aws::SQS::QueuePoller.new(queue)
poller.poll do |msg|
`deploy_shell_command`
end
@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
┬─┬ノ(ಠ_ಠノ)
@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.
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
---
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:
** [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
@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'