Skip to content

Instantly share code, notes, and snippets.

Working from home

Aki Atoji akiatoji

Working from home
Block or report user

Report or block akiatoji

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
akiatoji /
Created Mar 31, 2012 — forked from erikh/
OSX For Hackers
#!/usr/bin/env sh
# This is script with usefull tips taken from:
# install it:
# curl -sL | sh
View Installing RVM + Ruby + Rails + Passenger + nginx on CentOS
#Steps to install RVM + Ruby 1.9.2 + Rails + nginx + Passenger on CentOS (tested on v5.5)
# Install git and curl, if not already installed
sudo yum install git
sudo yum install curl
# Create the rvm group and add any users who will be using rvm to the group
sudo su -
groupadd rvm
akiatoji / Gemfile
Created Apr 7, 2012 — forked from simi/Gemfile
Refinery + Twitter Bootstrap WIP
View Gemfile
source ''
gem 'rails', '3.2.1'
# Bundle edge Rails instead:
# gem 'rails', :git => 'git://'
gem 'sqlite3'
akiatoji /
Created Apr 9, 2012
AWS AMI Bootstrap for Ruby1.9.3 + Chef (WIP)
sudo yum erase ruby ruby-libs ruby-mode ruby-rdoc ruby-irb ruby-ri ruby-docs
sudo yum install openssl-devel zlib-devel \
gcc gcc-c++ make autoconf readline-devel \
curl-devel expat-devel gettext-devel
cd /tmp
tar -xvzf ruby-1.9.3-p125.tar.gz
cd ruby-1.9.3-p125/
./configure --prefix=/usr/local
akiatoji / precompile_assets.textile
Created Apr 11, 2012 — forked from kathgironpe/precompile_assets.textile
Rails 3.1: Precompile Assets for Cloudfront/CDN support
View precompile_assets.textile

Naming files and using asset_path

- use <%= asset_path 'background.jpg' %>

on config/environments/production.rb

akiatoji /
Created Jun 6, 2012
CentOS 6.2 Box for Vagrant

Installing CentOS

Download net install iso: CentOS-6.2-x86_64-netinstall.iso

Create a new VirtualBox machine

  • Name: vagrant-centos
  • Operating System: Linux
  • Version: Red Hat
akiatoji / gist:2949808
Created Jun 18, 2012
Set up YARD to view locally installed gem rdocs
View gist:2949808
gem install yard
gem install redcarpet #needed to show markdown files
gem install github-markup
yard gems --rebuild
yard server -r -g -d
akiatoji / gist:2990910
Created Jun 25, 2012
awesome_print uninitialized constant BSON error fix
View gist:2990910

Started getting error below with edge mongoid.

aki@rydeen~/Dropbox/RubyProjects/zitta-orders > rails c
Loading development environment (Rails 3.2.6)
ruby-1.9.2-p290 :001 > ap 'wheee'
NameError: uninitialized constant BSON
	from /Users/aki/.rvm/gems/ruby-1.9.2-p290/gems/awesome_print-1.0.2/lib/awesome_print/ext/mongoid.rb:23:in `cast_with_mongoid'
	from /Users/aki/.rvm/gems/ruby-1.9.2-p290/gems/awesome_print-1.0.2/lib/awesome_print/formatter.rb:24:in `format'
akiatoji / gist:2992948
Created Jun 26, 2012
rspec let syntax trickery
View gist:2992948

Seems variables defined by let(){} is lazily instantiated.

This caused problems like so in specs:

# ends up calling methods on uninstantiated (nil) estimate
akiatoji / gist:3011794
Created Jun 28, 2012
OS X Lion: "yaml.h not found" error when trying to install Python modules (homebrew)
View gist:3011794

On OS X 10.7.4, you need to install libyaml by hand. Using homewbrew:

brew install libyaml

Then you can happily install python modules

sudo easy_install nltk SOAPpy pyOpenSSL lxml 
You can’t perform that action at this time.