Skip to content

Instantly share code, notes, and snippets.

Allen Bargi aziz

  • Gothenburg, Sweden
Block or report user

Report or block aziz

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
View tm2iterm.rb
#!/usr/bin/env ruby
# This script is an astonishing feat of top notch
# rockstar craftsmanship. It totally uses artificial
# intelligence to extract colors out of tmTheme and
# build an itermcolors scheme file for iTerm2.
# I know this sounds crazy, but it actually knows
# approximately what colors should be used in the
# ANSI list, and tries to find nearest colors from
aziz / .tmux.conf
Created Jan 29, 2012 — forked from paulrouget/.tmux.conf
Paul's configurations files
View .tmux.conf
set -g default-terminal "screen-256color"
set -g status-utf8 on
bind M source-file ~/.tmux/mac.session
bind L source-file ~/.tmux/linux.session
# set -g terminal-overrides 'xterm*:smcup@:rmcup@'
set -g status-bg black
aziz / snippet.js
Created Sep 28, 2011 — forked from necolas/snippet.js
Optimise DOM insertion of cross-domain scripts
View snippet.js
( function ( win, doc ) {
// Google Analytics global variable
win._gaq = [ ['_setAccount','UA-XXXXX-X'], ['_trackPageview'], ['_trackPageLoadTime'] ];
// Array of cross-domain script urls
var urls = [
'//', // Facebook SDK
'//', // Twitter Widgets
'', // Google +1 Button
aziz /
Created May 18, 2011 — forked from alexyoung/
Deployment script
#!/usr/bin/env bash
# Configuration
EXCLUDE='*.swp .git/ db/sphinx/ tmp/ log/'
View devise.fa.yml
not_found: "یافت نشد"
already_confirmed: "قبلا تایید شده است"
not_locked: "قفل نشده است"
one: "۱ خطا جلوی ذخیره %{resource} را گرفت:"
other: "%{count} خطا جلوی ذخیره این %{resource} را گرفت:"
aziz / snippet.txt
Created Apr 24, 2010 — forked from anonymous/snippet.txt
View snippet.txt
# --prefix=/usr --add-module=/opt/ruby-enterprise-1.8.7-2010.01/lib/ruby/gems/1.8/gems/passenger-2.2.9/ext/nginx --conf-path=/etc/nginx/nginx.conf --pid-path=/var/run/ --http-log-path=/var/log/nginx/access_log --error-log-path=/var/log/nginx/error_log --with-http_ssl_module --with-http_geoip_module --with-http_realip_module --with-http_addition_module --with-http_stub_status_module --with-http_flv_module --http-client-body-temp-path=/var/tmp/nginx/client --http-proxy-temp-path=/var/tmp/nginx/proxy --http-fastcgi-temp-path=/var/tmp/nginx/fastcgi --add-module=/home/aziz/nginx-modules/http_push_module --add-module=/home/aziz/nginx-modules/upload_progress_module --add-module=/home/aziz/nginx-modules/zip_module --add-module=/home/aziz/nginx-modules/memc_module --add-module=/home/aziz/nginx-modules/mp4_stream_module
# --with-http_ssl_module
# --with-http_geoip_module
# --with-http_realip_module
# --with-http_addition_module
# --with-http_stub_status_module
# --with-http_flv_module
# --add-module=/ht
View Evolution of a Ruby Programmer.rb
# Newbie Programmer
def factorial(x)
if x == 0
return 1
return x * factorial(x - 1)
puts factorial(6)
puts factorial(0)
View datasize.rake
# Run rake db:size to get a print of your database size in bytes.
# Run rake db:tables:size to get the sizes for individual tables
# Works for MySQL and PostgreSQL. Not tested elsewhere.
namespace :db do
desc 'Print data size for entire database'
task :size => :environment do
database_name = ActiveRecord::Base.connection.instance_variable_get("@config")[:database]
adapter = ActiveRecord::Base.connection.adapter_name.downcase
You can’t perform that action at this time.