Skip to content

Instantly share code, notes, and snippets.

@ebeigarts
ebeigarts / gist:179442
Created September 1, 2009 22:48
Ruby + Oracle + Snow Leopard
= Ruby + Oracle + Snow Leopard
Jāuzliek 64bit InstantClient:
http://www.oracle.com/technology/software/tech/oci/instantclient/htdocs/intel_macsoft.html
$ su -
$ export DYLD_LIBRARY_PATH=/path/to/instantclient
$ cd /path/to/instantclient && ln -s libclntsh.dylib.10.1 libclntsh.dylib
jQuery Visualize Plugin: Accessible Charts & Graphs from Table Elements using HTML 5 Canvas
http://www.filamentgroup.com/lab/jquery_visualize_plugin_accessible_charts_graphs_from_tables_html5_canvas/
Bluff is a JavaScript port of the Gruff graphing library for Ruby.
http://bluff.jcoglan.com/
Open Flash Chart II Plugin for Ruby on Rails - Graphs (we have used this before for interactive charts)
http://pullmonkey.com/projects/open_flash_chart2/
Interactive JS charts for your website (free for personal use):
cat ~/.ssh/id_dsa.pub | ssh user@server "cat >> .ssh/authorized_keys"
cat ~/.ssh/id_rsa.pub | ssh user@server "cat >> .ssh/authorized_keys"
@ebeigarts
ebeigarts / gist:970898
Created May 13, 2011 17:04
html2haml recursive
for f in `find . -regex '.*\.html\.erb'`; do echo "Converting $f" && html2haml $f > "${f%.erb}.haml" && rm $f; done
#!/usr/bin/ruby
at_exit do
raise "X" rescue nil
end
at_exit do
nil
end
@ebeigarts
ebeigarts / gist:1167680
Created August 24, 2011 09:35
VM benchmarks

Linode 768Mb, 4 cores

Benchmark Run: Wed Aug 24 2011 11:28:37 - 11:56:54
4 CPUs in system; running 1 parallel copy of tests

Dhrystone 2 using register variables       22392251.5 lps   (10.0 s, 7 samples)
Double-Precision Whetstone                     2722.9 MWIPS (9.9 s, 7 samples)
Execl Throughput                               1004.0 lps   (29.9 s, 2 samples)
File Copy 1024 bufsize 2000 maxblocks        243715.4 KBps  (30.0 s, 2 samples)
@ebeigarts
ebeigarts / devise.lv.yml
Created September 19, 2011 11:19
Latvian translation for Devise
# https://gist.github.com/gists/1226317
# Additional translations at http://github.com/plataformatec/devise/wiki/I18n
lv:
errors:
messages:
expired: 'derīgums beidzies, lūdzu piesakieties jaunam'
not_found: 'netika atrasts'
already_confirmed: 'ir jau apstiprināts, lūdzu mēģiniet pieslēgties'
not_locked: 'netika nobloķēts'
@ebeigarts
ebeigarts / gist:1245145
Created September 27, 2011 14:16
Resizing images

Resizes and converts pictures in the current directory to out/.

ImageMagick provides the mogrify command.

Options:

  • -colorspace RGB - converts CMYK to RGB (needed for TIFFs)
  • -density 72 - sets DPI to 72 (needed for TIFFs)
@ebeigarts
ebeigarts / Gemfile
Created January 5, 2012 10:42
Capistrano + Unicorn conf
# ...
gem 'unicorn'
@ebeigarts
ebeigarts / exif.md
Last active September 30, 2015 16:27
EXIF

Set file modification time from EXIF time

exiftool '−DateTimeOriginal>FileModifyDate' ./*

Update EXIF dates by -2 hours

exiftool −alldates-=2 ./*