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
source 'http://rubygems.org' | |
gem 'rails', '3.0.3' | |
# Bundle edge Rails instead: | |
# gem 'rails', :git => 'git://github.com/rails/rails.git' | |
gem 'mongoid', "2.0.0.rc.1" | |
gem 'bson_ext', "1.1.5" |
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
def expand(parent) | |
parent.posts.each do |child| | |
link = "/collections#{@engine.getPathFor(child)}/rubyfragment.html" | |
$document.write <<-END | |
<div><a href='#{link}'>#{child['name']}<a></div> | |
#{child['description']} | |
<div style='padding-left: 20px'> | |
END | |
expand child | |
$document.write <<-END |
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
def expand(parent) | |
parent.posts.each do |child| | |
link = "/collections#{@engine.getPathFor(child)}/rubyfragment.html" | |
$document.write <<-END | |
<div><a href='#{link}'>#{child['name']}<a></div> | |
#{child['description']} | |
<div style='padding-left: 20px'> | |
END | |
expand child | |
$document.write <<-END |
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
dd if=/dev/zero of=/mnt/swapfile.swap bs=1M count=1024 | |
mkswap /mnt/swapfile.swap | |
swapon /mnt/swapfile.swap |
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
-clean | |
-vmargs | |
-DCOMPONENT_CONFIG=instance.ini | |
-DGetOut=production,verbose,server:21003 | |
-XX:MaxPermSize=256m | |
-XX:+UseParallelOldGC | |
-XX:CompileCommand=exclude,org/restlet/engine/http/HeaderReader,readValue | |
-XX:CompileCommand=exclude,org/restlet/engine/http/PreferenceReader,readPreference |
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
public static native String track(String event) /*-{ | |
$wnd._gaq.push(['_trackEvent', 'navigation', 'click', event]) | |
}-*/; |
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
db.org.gogoego.vfs.blobs.files.ensureIndex({filename : 1, uploadDate:1}, {unique:true}); |
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
# ~/.bashrc: executed by bash(1) for non-login shells. | |
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc) | |
# for examples | |
# If not running interactively, don't do anything | |
if [[ -n "$PS1" ]] ; then | |
# don't put duplicate lines in the history. See bash(1) for more options | |
# ... or force ignoredups and ignorespace | |
HISTCONTROL=ignoredups:ignorespace |
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
cp 2011.2/Global/164002.png range/maps/164002.png | |
convert -thumbnail "478x1000>" 2011.2/Global/164002.png range/thumbs/164002.png | |
convert -thumbnail "176x500>" 2011.2/Global/164002.png range/minis/164002.png |
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
Created database encoding_test_1325444057 | |
Error message encoding is: ASCII-8BIT | |
#<Encoding::CompatibilityError: incompatible character encodings: UTF-8 and ASCII-8BIT> | |
pg_issue.rb:17:in `rescue in <main>' | |
pg_issue.rb:7:in `<main>' | |
Dropped database encoding_test_1325444057 |