These commands are good as of 2011-07-27.
App store http://itunes.apple.com/us/app/xcode/id448457090?mt=12) The download/install takes awhile so start it first. When it finishes downloading you will still need to run it to complete installation.
These commands are good as of 2011-07-27.
App store http://itunes.apple.com/us/app/xcode/id448457090?mt=12) The download/install takes awhile so start it first. When it finishes downloading you will still need to run it to complete installation.
| # download latest libevent2 and tmux sources, and extract them somewhere | |
| # (thx bluejedi for tip on latest tmux URL) | |
| # | |
| # at the time of writing: | |
| # https://github.com/downloads/libevent/libevent/libevent-2.0.21-stable.tar.gz | |
| # http://sourceforge.net/projects/tmux/files/latest/download?source=files | |
| # | |
| # install deps | |
| yum install gcc kernel-devel make ncurses-devel | 
| cd ~ | |
| sudo yum update | |
| sudo yum install java-1.7.0-openjdk.i686 -y | |
| wget https://github.com/downloads/elasticsearch/elasticsearch/elasticsearch-0.19.9.tar.gz -O elasticsearch.tar.gz | |
| tar -xf elasticsearch.tar.gz | |
| rm elasticsearch.tar.gz | |
| mv elasticsearch-* elasticsearch | |
| sudo mv elasticsearch /usr/local/share | 
HTTP is a stateless protocol. Sessions allow us to chain multiple requests together into a conversation between client and server.
Sessions should be an option of last resort. If there's no where else that the data can possibly go to achieve the desired functionality, only then should it be stored in the session. Sessions can be vulnerable to security threats from third parties, malicious users, and can cause scaling problems.
That doesn't mean we can't use sessions, but we should only use them where necessary.
| data_bag("vhosts").each do |site| | |
| site_data = data_bag_item("vhosts", site) | |
| site_name = site_data["id"] | |
| document_root = "/srv/apache/#{site_name}" | |
| template "/etc/httpd/conf.d/#{site_name}.conf" do | |
| source "custom-vhosts.erb" | |
| mode "0644" | |
| variables( | |
| :document_root => document_root, | 
Originally published in June 2008
When hiring Ruby on Rails programmers, knowing the right questions to ask during an interview was a real challenge for me at first. In 30 minutes or less, it's difficult to get a solid read on a candidate's skill set without looking at code they've previously written. And in the corporate/enterprise world, I often don't have access to their previous work.
To ensure we hired competent ruby developers at my last job, I created a list of 15 ruby questions -- a ruby measuring stick if you will -- to select the cream of the crop that walked through our doors.
Candidates will typically give you a range of responses based on their experience and personality. So it's up to you to decide the correctness of their answer.
| --- | |
| - hosts: server | |
| user: app_user | |
| gather_facts: False | |
| vars: | |
| user: app_user | |
| home_directory: "/home/{{ user }}" | |
| deploy_to: "{{ home_directory }}/app" | |
| roles: | 
| type 'a monoid = {zero : 'a; plus : 'a -> 'a -> 'a} | |
| let sum (m : 'a monoid) (l : 'a list) : 'a = List.fold_left m.plus m.zero l | |
| let string_summer = sum {zero = ""; plus = (^)} | |
| let int_summer = sum {zero = 0; plus = (+)} | 
| type 'a monoid = {zero : 'a; plus : 'a -> 'a -> 'a} | |
| let sum (m : 'a monoid) (l : 'a list) : 'a = List.fold_left m.plus m.zero l | |
| let string_summer = sum {zero = ""; plus = (^)} | |
| let int_summer = sum {zero = 0; plus = (+)} | 
I spent a lot of time trying to find a pretty optimal (for me) setup for Clojure… at the same time I was trying to dive in and learn it. This is never optimal; you shouldn't be fighting the environment while trying to learn something.
I feel like I went through a lot of pain searching Google, StackOverflow, blogs, and other sites for random tidbits of information and instructions.
This is a comprehensive "what I learned and what I ended up doing" that will hopefully be of use to others and act as a journal for myself if I ever have to do it again. I want to be very step-by-step and explain what's happening (and why) at each step.