Skip to content

Instantly share code, notes, and snippets.

$ AUTOFEATURE=true autotest
loading autotest/cucumber_rails_rspec2
/Users/giuseppe/.rvm/gems/ruby-1.9.2-p0@autotester/gems/cucumber-0.10.0/lib/cucumber/ast/feature.rb:15: warning: method redefined; discarding old gherkin_statement
/Users/giuseppe/.rvm/gems/ruby-1.9.2-p0@autotester/gems/cucumber-0.10.0/lib/cucumber/ast/feature_element.rb:10: warning: method redefined; discarding old gherkin_statement
/Users/giuseppe/.rvm/gems/ruby-1.9.2-p0@autotester/gems/cucumber-0.10.0/lib/cucumber/ast/table.rb:384: warning: shadowing outer local variable - hash
/Users/giuseppe/.rvm/gems/ruby-1.9.2-p0@autotester/gems/cucumber-0.10.0/lib/cucumber/ast/step.rb:18: warning: method redefined; discarding old gherkin_statement
/Users/giuseppe/.rvm/gems/ruby-1.9.2-p0@autotester/gems/cucumber-0.10.0/lib/cucumber/ast/examples.rb:11: warning: method redefined; discarding old gherkin_statement
<internal:lib/rubygems/custom_require>:29: warning: loading in progress, circular require considered harmful - /Users/giuseppe/.rvm/gems/ruby-1.
$ rvm info
ruby-1.9.2-p0@autotester:
system:
uname: "Darwin giupro.local 10.5.0 Darwin Kernel Version 10.5.0: Fri Nov 5 23:20:39 PDT 2010; root:xnu-1504.9.17~1/RELEASE_I386 i386 i386"
bash: "/bin/bash => GNU bash, version 3.2.48(1)-release (x86_64-apple-darwin10.0)"
zsh: "/bin/zsh => zsh 4.3.9 (i386-apple-darwin10.0)"
rvm:
GEM
remote: http://rubygems.org/
specs:
ZenTest (4.4.2)
abstract (1.0.0)
actionmailer (3.0.3)
actionpack (= 3.0.3)
mail (~> 2.2.9)
actionpack (3.0.3)
activemodel (= 3.0.3)
source 'http://rubygems.org'
gem 'rails', '3.0.3'
gem 'sqlite3-ruby', :require => 'sqlite3'
gem 'capistrano'
gem 'nifty-generators'
gem 'haml'
gem 'devise'
gem 'mysql2'
gem 'will_paginate', '3.0.pre2'
gem 'simple_form'
@giuseb
giuseb / gist:1424200
Created December 2, 2011 18:01
Example of multiple indents across columns with Prawn
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), 'prawn', 'lib'))
require 'rubygems'
require 'prawn'
require 'prawn/security'
require "prawn/layout"
Prawn.debug = true
Prawn::Document.generate "column_indent_bug.pdf" do
column_box([0, cursor], width: 500, height: 700, columns: 3, spacer: 25) do
font_size 10
@giuseb
giuseb / gist:1593783
Created January 11, 2012 08:50
Code that caused the first javascript asset to be loaded twice
module ActionView
module Helpers
module AssetTagHelper
# We redefine javascript_include_tag in order to auto-magically include
# the widgets javascripts. If you hame more than one javascript_include_tag
# call, the widgets javascripts gets included only once.
def javascript_include_tag_with_widgets(*sources)
unless @__widgets_has_already_included_its_js
options = sources.last.is_a?(Hash) ? sources.pop : {} # remove options
@giuseb
giuseb / gist:62dc0bc7ef4f56c451e3
Last active August 29, 2015 14:07
prawn-grouping failing spec
it 'should push question #4 to the second column' do
pdf = Prawn::Document.new do
font_size 10
column_box [0, cursor], columns: 2, width: bounds.width do
4.times do |i|
group do
text "<b>This is question ##{i+1}</b>", inline_format: true
move_down 10
5.times do |j|
text "#{j+1}. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore"
% The command line starts with a prompt waiting for user input; typing
% something at the prompt and pressing Enter invokes the interpreter; if
% the string is valid, Matlab will process the input and act accordingly,
% otherwise an error is raised and the relative message is shown below the
% input string
%
% At the command line, when you type a number and press enter
% Matlab will respond with that number
123
@giuseb
giuseb / gist:42d45897599e0a3bd454b075dbe5005d
Created November 28, 2016 07:21
purging all unwanted headers
$ sudo apt-get purge \
linux-headers-3.13.0-100 \
linux-headers-3.13.0-100-generic \
linux-headers-3.13.0-91 \
linux-headers-3.13.0-91-generic \
linux-headers-3.13.0-92 \
linux-headers-3.13.0-92-generic \
linux-headers-3.13.0-93 \
linux-headers-3.13.0-93-generic \
linux-headers-3.13.0-96 \
@giuseb
giuseb / gist:b8b6a28ec24de33c3c2060d42b91b7ff
Created November 28, 2016 07:32
Purging one linux header
$ sudo apt-get purge linux-headers-3.13.0-100
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
linux-headers-3.13.0-100* linux-headers-3.13.0-100-generic*
linux-image-extra-3.13.0-100-generic linux-image-extra-3.13.0-101-generic
linux-image-extra-3.13.0-92-generic
0 upgraded, 0 newly installed, 5 to remove and 7 not upgraded.