Skip to content

Instantly share code, notes, and snippets.

View aghyad's full-sized avatar
🤖
Never give up

Aghyad Saleh aghyad

🤖
Never give up
View GitHub Profile
@mraaroncruz
mraaroncruz / nginx.conf
Created May 23, 2012 19:11
No SSL redirects with Spree
server {
server_name example.com;
listen 80;
root /var/www/my_app/public;
passenger_enabled on;
error_page 500 502 503 504 /500.html;
client_max_body_size 4G;
keepalive_timeout 10;
}
@ryanb
ryanb / chef_solo_bootstrap.sh
Created April 5, 2012 04:35
Bootstrap Chef Solo
#!/usr/bin/env bash
apt-get -y update
apt-get -y install build-essential zlib1g-dev libssl-dev libreadline5-dev libyaml-dev
cd /tmp
wget ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p125.tar.gz
tar -xvzf ruby-1.9.3-p125.tar.gz
cd ruby-1.9.3-p125/
./configure --prefix=/usr/local
make
make install
@shageman
shageman / bar.rake
Created February 8, 2012 02:08
Testing rake tasks
File: lib/tasks/bar.rake
class BarOutput
def self.banner text
puts '*' * 60
puts " #{text}"
puts '*' * 60
end
def self.puts string
puts string
@simme
simme / Install_tmux
Created October 19, 2011 07:55
Install and configure tmux on Mac OS X
# First install tmux
brew install tmux
# For mouse support (for switching panes and windows)
# Only needed if you are using Terminal.app (iTerm has mouse support)
Install http://www.culater.net/software/SIMBL/SIMBL.php
Then install https://bitheap.org/mouseterm/
# More on mouse support http://floriancrouzat.net/2010/07/run-tmux-with-mouse-support-in-mac-os-x-terminal-app/
@jwo
jwo / registrations_controller.rb
Created September 30, 2011 23:11
API JSON authentication with Devise
class Api::RegistrationsController < Api::BaseController
respond_to :json
def create
user = User.new(params[:user])
if user.save
render :json=> user.as_json(:auth_token=>user.authentication_token, :email=>user.email), :status=>201
return
else
@seaneshbaugh
seaneshbaugh / emoticons.txt
Last active January 6, 2023 17:34
(。◕‿‿◕。)
( `ー´)
のヮの
( ˃ ヮ˂)
ಲ_ಲ
๏̯͡๏)
(  ゚,_ゝ゚)
ಠ_ಠ
(″・ ิ_・ิ)っ-̾
Σщ(゚Д゚щ)
@jjb
jjb / gist:950975
Created May 1, 2011 23:16
Using whenever with capistrano and bundler in multiple environments
We couldn’t find that file to show.
@yuya-takeyama
yuya-takeyama / binarytree.rb
Created February 5, 2011 14:32
Binary Tree implemented in Ruby.
module BinaryTree
class Node
attr_reader :word, :count, :left, :right
include Enumerable
def initialize(word)
@word, @count = word, 1
end