Skip to content

Instantly share code, notes, and snippets.

View khelll's full-sized avatar

Khaled alHabache khelll

View GitHub Profile
#!/bin/sh
### BEGIN INIT INFO
# Provides: nginx
# Required-Start: $local_fs $remote_fs
# Required-Stop: $local_fs $remote_fs
# Default-Start: 2 3 4 5
# Default-Stop: S 0 1 6
# Short-Description: nginx initscript
# Description: nginx
### END INIT INF
khelll@khelll-laptop:~/projects/merb-book$ git rebase mattetti/master
book-content/ar/toc.markdown: needs update
gems/bin/autospec: needs update
gems/bin/edit_json.rb: needs update
gems/bin/erubis: needs update
gems/bin/gpgen: needs update
gems/bin/maruku: needs update
gems/bin/marutex: needs update
gems/bin/merb: needs update
gems/bin/mongrel_rails: needs update
#!/usr/bin/ruby
require 'rubygems'
require 'nokogiri'
require 'open-uri'
require 'growl'
# Configuration
#
# URL to get questions from
@@v = 1
class MyClass
@@v = 2
end
@@v #=>2
class Spot
include Mongoid::Document
include Mongoid::Timestamps
## Fields ##
field :name_t
## Associations ##
embeds_many :items
testing
# Default ruby is 1.9.3, but opening a new shell results in having 1.9.2 instead!
~|⇒ ruby -v
ruby 1.9.2p290 (2011-07-09 revision 32553) [x86_64-darwin11.2.0]
~|⇒ rvm list default
Default Ruby (for new shells)
ruby-1.9.3-p125 [ x86_64 ]
@khelll
khelll / install-ffmpeg-amazon-linux.sh
Last active March 3, 2016 14:40 — forked from gboudreau/install-ffmpeg-amazon-linux.sh
How to compile ffmpeg on Amazon Linux (EC2)
#!/bin/sh
# Based on instructions found here: http://wiki.razuna.com/display/ecp/FFMpeg+Installation+on+CentOS+and+RedHat#FFMpegInstallationonCentOSandRedHat-InstallX264
# usage \curl -sSL https://gist.githubusercontent.com/khelll/6eee332fcbc8667b326c/raw/4efeb70acad6e41fea129c472d6bf7f2236fa37d/install-ffmpeg-amazon-linux.sh | bash
if [ "`/usr/bin/whoami`" != "root" ]; then
echo "You need to execute this script as root."
exit 1
fi
rm -rf ~/ffmpeg_build ~/bin/{ffmpeg,ffprobe,ffserver,lame,vsyasm,x264,x265,yasm,ytasm}
class Kops < Formula
desc "Production Grade K8s Installation, Upgrades, and Management"
homepage "https://github.com/kubernetes/kops"
url "https://github.com/kubernetes/kops/archive/1.8.0.tar.gz"
sha256 "16d75793d138204c56c43c28e356102a11901919ae9c7ce2eea16843f340abe6"
head "https://github.com/kubernetes/kops.git"
bottle do
cellar :any_skip_relocation
rebuild 1
@khelll
khelll / nginx
Created January 10, 2015 05:12
A start / stop script for Nginx on Amazon Linux
#!/bin/sh
### BEGIN INIT INFO
# Provides: nginx
# Required-Start: $local_fs $remote_fs
# Required-Stop: $local_fs $remote_fs
# Default-Start: 2 3 4 5
# Default-Stop: S 0 1 6
# Short-Description: nginx initscript
# Description: nginx
### END INIT INF