Skip to content

Instantly share code, notes, and snippets.

@ihoka
ihoka / gist:2236039
Created March 29, 2012 11:20
Reset to now file timestamps that are in the future in the current directory
touch now; find . -newer now | xargs touch; rm now
@ihoka
ihoka / gist:1865589
Created February 19, 2012 20:23
Install ruby-debug with ruby-1.9.3-p125
# Install with:
# bash < <(curl -L https://raw.github.com/gist/1865589)
#
# Reference: http://blog.wyeworks.com/2011/11/1/ruby-1-9-3-and-ruby-debug
echo "Installing ruby-debug with ruby-1.9.3-p125 ..."
curl -OL http://rubyforge.org/frs/download.php/75414/linecache19-0.5.13.gem
curl -OL http://rubyforge.org/frs/download.php/75415/ruby-debug-base19-0.11.26.gem
@ihoka
ihoka / gist:1681528
Created January 26, 2012 07:31
Install ruby-1.9.3-p0 with performance patches
# Install with:
# bash < <(curl -L https://raw.github.com/gist/1681528)
#
# Reference: https://gist.github.com/1681512
echo "Installing ruby-1.9.3-p0 with performance patches"
curl https://raw.github.com/gist/1658360/2eee5541435663deddd674617bf26ae645b015bd/cumulative_performance.patch > $rvm_path/patches/ruby/1.9.3/p0/falcon.patch
rvm install 1.9.3 --patch falcon --force
@ihoka
ihoka / cumulative_performance.patch
Created January 26, 2012 07:26 — forked from funny-falcon/cumulative_performance.patch
ruby-1.9.3-p0 cumulative performance patch.
diff --git a/common.mk b/common.mk
index ea244cc..4f22609 100644
--- a/common.mk
+++ b/common.mk
@@ -629,7 +629,8 @@ file.$(OBJEXT): {$(VPATH)}file.c $(RUBY_H_INCLUDES) {$(VPATH)}io.h \
gc.$(OBJEXT): {$(VPATH)}gc.c $(RUBY_H_INCLUDES) {$(VPATH)}re.h \
{$(VPATH)}regex.h $(ENCODING_H_INCLUDES) $(VM_CORE_H_INCLUDES) \
{$(VPATH)}gc.h {$(VPATH)}io.h {$(VPATH)}eval_intern.h {$(VPATH)}util.h \
- {$(VPATH)}debug.h {$(VPATH)}internal.h {$(VPATH)}constant.h
+ {$(VPATH)}debug.h {$(VPATH)}internal.h {$(VPATH)}constant.h \
@ihoka
ihoka / gist:1422357
Created December 2, 2011 08:38 — forked from dx7/gist:1333785
Install ruby-debug with ruby-1.9.3-p0
# Install with:
# bash < <(curl -L https://raw.github.com/gist/1422357)
#
# Reference: http://blog.wyeworks.com/2011/11/1/ruby-1-9-3-and-ruby-debug
echo "Installing ruby-debug with ruby-1.9.3-p0 ..."
curl -OL http://rubyforge.org/frs/download.php/75414/linecache19-0.5.13.gem
curl -OL http://rubyforge.org/frs/download.php/75415/ruby-debug-base19-0.11.26.gem
@ihoka
ihoka / gist:1213397
Created September 13, 2011 08:15
sass-convert --help
Usage: sass-convert [options] [INPUT] [OUTPUT]
Description:
Converts between CSS, Sass, and SCSS files.
E.g. converts from SCSS to Sass,
or converts from CSS to SCSS (adding appropriate nesting).
Options:
-F, --from FORMAT The format to convert from. Can be css, scss, sass, less.
By default, this is inferred from the input filename.
ActionDefinition
config_key
start_day
content
PrintedInvoice
options:
- magic envelope
ThankYouNote
stage_1:
- printed_invoice
- printed_invoice_magic_envelope
stage_2:
- printed_invoice
printed_invoice:
:type: PrintedInvoice
production:
adapter: mysql
database: Blinksale
username: deploy
password: *****
host: xxx.compute-1.amazonaws.com
reconnect: true
mailbox_production:
adapter: mysql
module DateHelpers
DATE_TIME_SUFFIXES = {
:year => '1i',
:month => '2i',
:day => '3i',
:hour => '4i',
:minute => '5i'
}
def select_date(date_to_select, options ={})