Skip to content

Instantly share code, notes, and snippets.

View danishsatkut's full-sized avatar
🏠
Working from home

Danish Aziz Satkut danishsatkut

🏠
Working from home
View GitHub Profile
@danishsatkut
danishsatkut / http_headers_dump.rb
Last active August 29, 2015 14:27 — forked from fallwith/http_headers_dump.rb
Rails controller code to dump raw HTTP headers from a request
logger.error "*** BEGIN RAW REQUEST HEADERS ***"
self.request.env.each do |header|
logger.error "HEADER: #{header[0]} => #{header[1]}"
end
logger.error "*** END RAW REQUEST HEADERS ***"
source /usr/local/git/contrib/completion/git-completion.bash
complete -C "/usr/bin/gemedit --complete" gemedit
export WORKON_HOME=~/.env
export JAVA7_HOME=/Library/Java/JavaVirtualMachines/jdk1.7.0_09.jdk/Contents/Home
export JAVA6_HOME=/Library/Java/Home
export JAVA_HOME=$JAVA6_HOME
export PATH=$JAVA_HOME/bin:$PATH
export SBT_OPTS="-XX:MaxPermSize=256M"
# download the proper versions of s3fs and fuse
wget http://s3fs.googlecode.com/files/s3fs-1.61.tar.gz
wget http://downloads.sourceforge.net/project/fuse/fuse-2.X/2.8.4/fuse-2.8.4.tar.gz
# unpack them
tar -xzf s3fs-1.61.tar.gz
tar -xzf fuse-2.8.4.tar.gz
# install dependencies
yum install gcc libstdc++-devel gcc-c++ curl-devel libxml2-devel openssl-devel mailcap
@danishsatkut
danishsatkut / capybara cheat sheet.md
Created November 5, 2013 18:36 — forked from zhengjia/capybara cheat sheet
Cheatsheet for capybara

=Navigating= visit('/projects') visit(post_comments_path(post))

=Clicking links and buttons= click_link('id-of-link') click_link('Link Text') click_button('Save') click('Link Text') # Click either a link or a button click('Button Value')

@danishsatkut
danishsatkut / cookie.js
Created October 30, 2013 14:32 — forked from ChillyBwoy/cookie.js
Object oriented Cookie class in JavaScript
#!/bin/bash
### BEGIN INIT INFO
# Provides: sidekiq beta
# Required-Start: $syslog $remote_fs
# Required-Stop: $syslog $remote_fs
# Should-Start: $local_fs
# Should-Stop: $local_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: sidekiq beta - asynchronous rails
@danishsatkut
danishsatkut / jquery.masonry.js
Created January 7, 2013 05:32 — forked from stuross/gist:1649731
Masonry jquery script
/**
* jQuery Masonry v2.1.01
* A dynamic layout plugin for jQuery
* The flip-side of CSS Floats
* http://masonry.desandro.com
*
* Licensed under the MIT license.
* Copyright 2011 David DeSandro
*/