Skip to content

Instantly share code, notes, and snippets.

View giosakti's full-sized avatar
✍️
Writing code

Giovanni Sakti giosakti

✍️
Writing code
View GitHub Profile
@giosakti
giosakti / application.rb
Created September 25, 2012 01:30 — forked from finack/application.rb
Example Chef Deploy Revision for Rails 3+
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]
@giosakti
giosakti / culerity.js
Created June 29, 2012 13:33 — forked from jlindsey/culerity.js
[RoR] Using Cucumber/Capybara/Culerity, a step to wait until all AJAX calls are complete.
// this allows culerity to wait until all ajax requests have finished
jQuery(function($) {
var original_ajax = $.ajax;
var count_down = function(callback) {
return function() {
try {
if(callback) {
callback.apply(this, arguments);
};
} catch(e) {
@giosakti
giosakti / es.sh
Created June 29, 2012 07:19
Install ElasticSearch on Ubuntu 12.04
cd ~
sudo apt-get update
sudo apt-get install openjdk-7-jre -y
wget https://github.com/downloads/elasticsearch/elasticsearch/elasticsearch-0.19.7.tar.gz -O elasticsearch.tar.gz
tar -xf elasticsearch.tar.gz
rm elasticsearch.tar.gz
sudo mv elasticsearch-* elasticsearch
sudo mv elasticsearch /usr/local/share