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/ruby | |
require 'net/imap' | |
require 'date' | |
require 'rubygems' | |
require 'active_support/core_ext/array/grouping' | |
include ActiveSupport::CoreExtensions::Array::Grouping |
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
- simple | |
- public over private | |
- personal vanity | |
- internet is global | |
- permalinks | |
- one important item per page | |
- don't break the browser | |
- don't wanker in technology | |
- a medium is not a grande | |
- break convention for your users |
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
sudo apt-get update | |
sudo apt-get install build-essential vim vim-gnome git-core subversion openssl mysql-server libssl-dev libreadline5-dev libxml2 libxml2-dev libxslt-dev | |
wget ftp://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.6-p369.tar.gz | |
tar xvf ruby-1.8.6-p369.tar.gz | |
cd ruby-1.8.6-p369/ | |
./configure | |
./make && sudo make install | |
cd .. |
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
TypeError (wrong argument type Hash (expected Data)): | |
/vendor/rails/activerecord/lib/../../activesupport/lib/active_support/json/encoding.rb:21:in `to_json' | |
/vendor/rails/activerecord/lib/../../activesupport/lib/active_support/json/encoding.rb:21:in `send' | |
/vendor/rails/activerecord/lib/../../activesupport/lib/active_support/json/encoding.rb:21:in `encode' | |
/vendor/rails/activerecord/lib/../../activesupport/lib/active_support/json/encoding.rb:31:in `raise_on_circular_reference' | |
/vendor/rails/activerecord/lib/../../activesupport/lib/active_support/json/encoding.rb:20:in `encode' | |
/vendor/rails/activerecord/lib/../../activesupport/lib/active_support/json/encoders/enumerable.rb:10:in `to_json' | |
/vendor/rails/activerecord/lib/active_record/attribute_methods.rb:211:in `map' | |
/vendor/rails/activerecord/lib/active_record/validations.rb:139:in `each' | |
/vendor/rails/activerecord/lib/active_record/validations.rb:139:in `each' |
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
#!/bin/bash | |
PERIOD=60 | |
while [ 1=1 ]; | |
do | |
rake jobs:work & | |
sleep $PERIOD | |
echo Killing $! | |
kill $! | |
done |
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
diff --git a/app/models/question.rb b/app/models/question.rb | |
index c38bbbb..7f6cfdc 100644 | |
--- a/app/models/question.rb | |
+++ b/app/models/question.rb | |
@@ -10,6 +10,5 @@ | |
class Question < ActiveRecord::Base | |
validates_presence_of :body | |
- has_many :answers # TODO dependent => :destroy? | |
- |
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 -R network_source/0.0.1/library/sparky/templates/core/ network/0.0.1/core/sparky/ | |
$ cd network/0.0.1/core/sparky/ | |
$ rm -rf c f h i j | |
$ mv core/* . | |
$ rm -rf core |
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
find core/j -name *.js | xargs -n1 -I filename java -jar yuicompressor-2.4.2.jar -v --line-break 0 filename -o filename-min.js |
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
# http://henrik.nyh.se/2008/12/git-dirty-prompt | |
# http://www.simplisticcomplexity.com/2008/03/13/show-your-git-branch-name-in-your-prompt/ | |
# username@Machine ~/dev/dir[master]$ # clean working directory | |
# username@Machine ~/dev/dir[master*]$ # dirty working directory | |
function parse_git_dirty { | |
[[ $(git status 2> /dev/null | tail -n1) != "nothing to commit (working directory clean)" ]] && echo " *" | |
} | |
function parse_git_branch { | |
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e "s/* \(.*\)/[\1$(parse_git_dirty)]/" |
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
worker_processes 1 | |
listen 3000 | |
stderr_path "log/unicorn.stderr.log" | |
stdout_path "log/unicorn.stdout.log" | |
before_fork do |server, worker| | |
system("echo \"#{DateTime.now}\r#{Dir.pwd}\" | growlnotify 'Forking now...'") | |
end |
OlderNewer