Skip to content

Instantly share code, notes, and snippets.

View jumph4x's full-sized avatar

Denis Ivanov jumph4x

  • FCP Euro
  • Oakland
View GitHub Profile
E, [2014-03-12T03:20:47.629624 #4831] ERROR -- : reaped #<Process::Status: pid 8800 SIGIOT (signal 6)> worker=1
E, [2014-03-12T03:20:48.706269 #4831] ERROR -- : reaped #<Process::Status: pid 8807 SIGIOT (signal 6)> worker=2
I, [2014-03-12T03:20:49.119220 #8923] INFO -- : worker=1 ready
I, [2014-03-12T03:20:50.187214 #8931] INFO -- : worker=2 ready
E, [2014-03-12T03:21:17.674619 #4831] ERROR -- : reaped #<Process::Status: pid 8923 SIGIOT (signal 6)> worker=1
E, [2014-03-12T03:21:18.752262 #4831] ERROR -- : reaped #<Process::Status: pid 8654 SIGIOT (signal 6)> worker=3
I, [2014-03-12T03:21:19.199141 #9058] INFO -- : worker=1 ready
I, [2014-03-12T03:21:20.562642 #9072] INFO -- : worker=3 ready
E, [2014-03-12T03:21:47.845514 #4831] ERROR -- : reaped #<Process::Status: pid 9058 SIGIOT (signal 6)> worker=1
E, [2014-03-12T03:21:48.921430 #4831] ERROR -- : reaped #<Process::Status: pid 8787 SIGIOT (signal 6)> worker=0
~ curl -w "@curl-format.txt" -o /dev/null -s http://xxx.fastly-plugins.com
time_namelookup: 0.001
time_connect: 0.019
time_appconnect: 0.000
time_pretransfer: 0.019
time_redirect: 0.000
time_starttransfer: 0.038
----------
time_total: 0.040
@jumph4x
jumph4x / gist:194473
Created September 26, 2009 22:14
Can factory_girl do this? Is it my RSpec loading order?
# factories.rb
Factory.define :app do |i|
i.association :sku, :factory => :sku
i.base_vehicle_id BaseVehicle.last.id
end
# base_vehicle.rb
class BaseVehicle < ActiveRecord::Base
self.establish_connection :special_connection
end
require 'rubygems'
require 'spork'
require 'factory_girl'
Spork.prefork do
# Loading more in this block will cause your tests to run faster. However,
# if you change any configuration or code from libraries loaded here, you'll
# need to restart spork for it take effect.
unless defined? SPREE_ROOT
require 'prawn/layout'
require 'prawn/format'
bill_address = @order.bill_address
ship_address = @order.ship_address
font "Helvetica"
image Spree::PrintInvoice::Config[:print_invoice_logo_path], :at => [0,720], :scale => 0.65
@jumph4x
jumph4x / hw0-makefile
Created January 27, 2011 03:50
CSE4100/hw0: Makefile
OFILES = main.o# type.o
LEX = flex
BISON = bison
CPATH =
CC = $(CPATH)llvm-g++
LD = $(CPATH)llvm-g++
CXXFLAGS = `$(CPATH)llvm-config --cppflags`
LDFLAGS = `$(CPATH)llvm-config --ldflags --libs core jit native`
all: typetest
@jumph4x
jumph4x / gist:2139089
Created March 20, 2012 18:16
Asset precompilation failure with Spree 1.0.3 and Rails 3.1.4
denis@h213h:~$ cd rails/vanilla-spree/
denis@h213h:~/rails/vanilla-spree$ rake assets:precompile --trace
(in /home/denis/rails/vanilla-spree)
** Invoke assets:precompile (first_time)
** Execute assets:precompile
/home/denis/.rvm/rubies/ruby-1.9.2-p290/bin/ruby ./bundler_stubs/rake assets:precompile:all RAILS_ENV=production RAILS_GROUPS=assets --trace
(in /home/denis/rails/vanilla-spree)
** Invoke assets:precompile:all (first_time)
** Execute assets:precompile:all
** Invoke assets:precompile:primary (first_time)
@jumph4x
jumph4x / gist:2141056
Created March 20, 2012 20:39
Loopty loop
# rake
# Same as invoke, but explicitly pass a call chain to detect
# circular dependencies.
def invoke_with_call_chain(task_args, invocation_chain) # :nodoc:
new_chain = InvocationChain.append(self, invocation_chain)
@lock.synchronize do
if application.options.trace
$stderr.puts "** Invoke #{name} #{format_trace_flags}"
end
@jumph4x
jumph4x / gist:2152664
Created March 21, 2012 20:37
manual rate_hash iteration for spree
#this is what Order#rate_hash outputs, roughly
sample_rate_hash = [{:id => 4, :name => 'ShippingMethod', :price => 24.55}]
# we take the array of hashes and for each one we create an HTML <option>, we show the user the name and the price, for value we store the shipping_method_id
# then we join all the html options into one string
# then we mark the string as safe for frontend
options = sample_rate_hash.map{|rate| content_tag(:option, "#{rate[:name]} #{rate[:price]}", :value => rate[:shipping_method_id])}.join.html_safe
# then we simply give that to select
select_tag :order, options
@jumph4x
jumph4x / gist:2158376
Created March 22, 2012 13:37
Using [unreleased] master spree executables to generate extensions
bundle
bundle show spree
# => /home/denis/.rvm/gems/ruby-1.9.2-p290/bundler/gems/spree-b58d645ac730/cmd
/home/denis/.rvm/gems/ruby-1.9.2-p290/bundler/gems/spree-b58d645ac730/cmd/bin/spree
# voila