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
@aghyad
aghyad / chef_solo_bootstrap_ubuntu.sh
Last active January 3, 2016 07:09 — forked from ryanb/chef_solo_bootstrap.sh
chef_solo_bootstrap.sh for Ubuntu <forked from RyanB's Ubuntu>
#!/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
@aghyad
aghyad / chef_solo_bootstrap_centos.sh
Last active January 3, 2016 07:09 — forked from ryanb/chef_solo_bootstrap.sh
chef_solo_bootstrap.sh for Centos 6.5 <forked from RyanB's Ubuntu>
#!/usr/bin/env bash
sudo yum -y update && sudo yum -y install build-essential zlib1g-dev libssl-dev libreadline5-dev libyaml-dev libyaml wget rubygems
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
sudo make
sudo make install
gem install chef ruby-shadow --no-ri --no-rdoc
module BinaryTree
class Node
attr_reader :word, :count, :left, :right
include Enumerable
def initialize(word)
@word, @count = word, 1
end