This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'RMagick' | |
require 'capybara' | |
require 'launchy' | |
module Capybara::Recording | |
def start_recording | |
system "rm -f tmp/*" | |
end | |
def save_recording |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pietia@a /System/Library/Frameworks/Ruby.framework $ tree . | |
. | |
├── Headers -> /Users/pietia/.rbenv/sources/1.8.7-p371/ruby-1.8.7-p371 | |
└── Versions | |
└── 1.8 | |
└── usr -> /Users/pietia/.rbenv/versions/1.8.7-p371 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sqlite3 ~/Library/Preferences/com.apple.LaunchServices.QuarantineEventsV* 'select LSQuarantineDataURLString from LSQuarantineEvent' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
karol@brenta:~/projects/personal/rubinius (master) $ ruby-head --version | |
ruby 2.0.0dev (2013-02-18) [x86_64-darwin12.2.1] | |
karol@brenta:~/projects/personal/rubinius (master) $ ./bin/benchmark -t ./bin/rbx -t ^ruby-head benchmark/core/float/ | |
Found rvm-managed ruby: ruby-head | |
=== ./bin/rbx === | |
Float + Float => Float | |
39644327.2 (±1.9%) i/s - 197996600 in 4.996082s (cycle=147100) | |
Float + Fixnum => Float | |
39234682.7 (±1.3%) i/s - 196176456 in 5.000912s (cycle=199976) | |
Float + Bignum => Float |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://www.virtualbox.org/wiki/Downloads | |
https://github.com/xdissent/ievms | |
For each installed VM: | |
- Enable copy&paste (Settings -> General -> Advanced -> Shared Clipboard -> Host To Guest) | |
- Add more video memory (Settings -> Display -> Video -> Video Memory -> 128 MB ?) | |
- Add Finnish keyboard layout as default and remove others | |
- Set IE homepage to about:blank | |
- Disable Windows key http://support.microsoft.com/kb/216893#FixItForMeAlways | |
- Take snapshot |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# I came across this snippet http://gistflow.com/posts/422-highlight-code-for-keynote-presentation | |
# but it didn’t work until @pietia was so nice to point out that there’s no need for the output file. | |
# 1. Install highlight | |
brew install highlight | |
# 2. Add this to e.g. .bash_profile and reload it | |
function hl() { | |
format=${1-rb}; | |
pbpaste | highlight --syntax=$format -O rtf | pbcopy; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// node.js proxy server example for adding CORS headers to any existing http services. | |
// yes, i know this is super basic, that's why it's here. use this to help understand how http-proxy works with express if you need future routing capabilities | |
var httpProxy = require('http-proxy'), | |
express = require('express'); | |
var proxy = new httpProxy.RoutingProxy(); | |
var proxyOptions = { | |
host: '192.168.3.11', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
apt-get -y update | |
apt-get -y install build-essential zlib1g-dev libssl-dev libreadline-gplv2-dev libyaml-dev | |
cd /tmp | |
wget ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p194.tar.gz | |
tar -xvzf ruby-1.9.3-p194.tar.gz | |
cd ruby-1.9.3-p194/ | |
./configure --prefix=/usr/local | |
make | |
make install |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
apt-get -y update | |
apt-get -y install build-essential zlib1g-dev libssl-dev libreadline5-dev libyaml-dev | |
cd /tmp | |
wget ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p125.tar.gz | |
tar -xvzf ruby-1.9.3-p125.tar.gz | |
cd ruby-1.9.3-p125/ | |
./configure --prefix=/usr/local | |
make | |
make install |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
app = node[:rails][:app] | |
rails_base app[:name] do | |
ruby_ver app[:ruby_ver] | |
gemset app[:gemset] | |
end | |
%w{config log pids cached-copy bundle system}.each do |dir| | |
directory "#{app[:app_root]}/shared/#{dir}" do | |
owner app[:deploy_user] |
NewerOlder