Skip to content

Instantly share code, notes, and snippets.

View jnarowski's full-sized avatar

John Paul Narowski jnarowski

View GitHub Profile
class SecretSantaPicker
def pick!
matches = {}
people = [
'JP',
'Wladyslaw',
'Nell',
'JP',
'Pam',
'Marianna',
class ReadModel::ContactsSource
include Common::HasAccessor
inject :config
inject :contacts_authorization
inject :history_source
CONTACT_FIELDS = [
:leads__id, :first_name, :last_name, :position, :cached_tag_list, :lead_status_id,
:lead_process_id, :user_id, :leads__created_at, :leads__updated_at,
:referral_source_id, :background, :leads__private, :avatar_file_name, :company_id,
ERROR in ./~/tough-cookie/lib/cookie.js
Module not found: Error: Cannot resolve module 'net' in /Users/johnpaulnarowski/Dev/karma/git/karma3_learning/client/node_modules/tough-cookie/lib
@ ./~/tough-cookie/lib/cookie.js 32:10-24
ERROR in ./~/tough-cookie/package.json
Module parse failed: /Users/johnpaulnarowski/Dev/karma/git/karma3_learning/client/node_modules/tough-cookie/package.json Line 2: Unexpected token :
You may need an appropriate loader to handle this file type.
| {
| "_args": [
| [
def remote_process_exists?(pid_file)
capture("ps -p $(cat #{pid_file}) ; true").strip.split("\n").size == 2
end
namespace :resques do
desc "Start Resque workerss"
task :start do
puts "Starting #{resque_num_of_queues} worker(s) with QUEUE: #{resque_queue_name}"
resque_num_of_queues.times do |i|
pid = "#{current_path}/tmp/pids/resque_worker_#{i}.pid"
+ 1m 08s ~> Setting ownership to deploy:deploy
/data/karma2/shared/bundled_gems/ruby/1.9.1/gems/psych-1.3.4/lib/psych.rb:96: warning: already initialized constant VERSION
/data/karma2/shared/bundled_gems/ruby/1.9.1/gems/psych-1.3.4/lib/psych.rb:99: warning: already initialized constant LIBYAML_VERSION
Resque::Helpers will be gone with no replacement in Resque 2.0.0.
/usr/bin/ruby19 /data/karma2/releases/20140226061235/ey_bundler_binstubs/rake assets:precompile:all RAILS_ENV=production RAILS_GROUPS=assets
Resque::Helpers will be gone with no replacement in Resque 2.0.0.
rake aborted!
Command failed with status (): [/usr/bin/ruby19 /data/karma2/releases/2014...]
/data/karma2/shared/bundled_gems/ruby/1.9.1/gems/turbo-sprockets-rails3-0.3.5/lib/turbo-sprockets/tasks/assets.rake:24:in `ruby_rake_task'
/data/karma2/shared/bundled_gems/ruby/1.9.1/gems/turbo-sprockets-rails3-0.3.5/li
#!/bin/sh
#
# /engineyard/bin/sidekiq
#
# Author: Jim Neath (jneath@engineyard.com)
#
# must be root
if [[ "$(whoami)" != "root" ]]; then
[Sat, 08 Jun 2013 23:06:58 +0000] INFO: Starting Chef Solo Run
/usr/local/ey_resin/ruby/lib/ruby/gems/1.8/gems/chef-0.6.0.2/lib/chef/node.rb:180:in `method_missing': Attribute default is not defined! (ArgumentError)
from /etc/chef-custom/recipes/cookbooks/sidekiq/attributes/default.rb:6:in `from_file'
from /usr/local/ey_resin/ruby/lib/ruby/gems/1.8/gems/chef-0.6.0.2/lib/chef/cookbook.rb:73:in `load_attributes'
from /usr/local/ey_resin/ruby/lib/ruby/gems/1.8/gems/chef-0.6.0.2/lib/chef/cookbook.rb:71:in `each'
from /usr/local/ey_resin/ruby/lib/ruby/gems/1.8/gems/chef-0.6.0.2/lib/chef/cookbook.rb:71:in `load_attributes'
from /usr/local/ey_resin/ruby/lib/ruby/gems/1.8/gems/chef-0.6.0.2/lib/chef/compile.rb:61:in `load_attributes'
from /usr/local/ey_resin/ruby/lib/ruby/gems/1.8/gems/chef-0.6.0.2/lib/chef/cookbook_loader.rb:107:in `each'
from /usr/local/ey_resin/ruby/lib/ruby/gems/1.8/gems/chef-0.6.0.2/lib/chef/cookbook_loader.rb:106:in `each_value'
from /usr/local/ey_resin/ruby/lib/ruby/gems/1.8/gems/chef-
# #
# # Cookbook Name:: resque
# # Recipe:: default
# #
# if ['solo', 'util'].include?(node[:instance_role])
# unless node[:name].include?("elasticsearch_")
# execute "install resque gem" do
# command "gem install resque redis redis-namespace yajl-ruby -r"
# not_if { "gem list | grep resque" }
# end
No such file or directory - getcwd
/data/karma2/shared/bundled_gems/ruby/1.9.1/gems/actionpack-3.2.11/lib/action_view/template/resolver.rb:221:in `expand_path'
/data/karma2/shared/bundled_gems/ruby/1.9.1/gems/actionpack-3.2.11/lib/action_view/template/resolver.rb:221:in `initialize'
/data/karma2/shared/bundled_gems/ruby/1.9.1/gems/actionpack-3.2.11/lib/action_view/template/resolver.rb:251:in `new'
/data/karma2/shared/bundled_gems/ruby/1.9.1/gems/actionpack-3.2.11/lib/action_view/template/resolver.rb:251:in `instances'
/data/karma2/shared/bundled_gems/ruby/1.9.1/gems/actionpack-3.2.11/lib/action_view/lookup_context.rb:16:in `<class:LookupContext>'
/data/karma2/shared/bundled_gems/ruby/1.9.1/gems/actionpack-3.2.11/lib/action_view/lookup_context.rb:12:in `<module:ActionView>'
/data/karma2/shared/bundled_gems/ruby/1.9.1/gems/actionpack-3.2.11/lib/action_view/lookup_context.rb:5:in `<top (required)>'
/data/karma2/shared/bundled_gems/ruby/1.9.1/gems/actionpack-3.2.11/lib/action_view/base.rb:206:in `initialize'
/dat
template "/data/#{app}/shared/config/resque_#{count}.conf" do
owner node[:owner_name]
group node[:owner_name]
mode 0644
source "resque_wildcard.conf.erb"
end