Skip to content

Instantly share code, notes, and snippets.

Ibrahim Muhammad whistler

Block or report user

Report or block whistler

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
@joshfraser
joshfraser / gist:819308dbae43ff70d892
Created Jun 6, 2014
clickjacking POC for amazon.com
View gist:819308dbae43ff70d892
<html>
<title>Click-jacking on Amazon.com</title>
<head>
<style type="text/css">
body {
background-color: #fafafa;
}
a {
color:rgb(228, 121, 17);
@whistler
whistler / ubuntu_nodejs.sh
Created Jun 30, 2013
This script installs nodejs, coffeescript and git on an Ubuntu machine. Configures git to use with Github and clones a repository with a node project and installs its dependencies.
View ubuntu_nodejs.sh
# This script installs nodejs, coffeescript and git on an Ubuntu machine.
# Configures git to use with Github and clones a repository with a node
# project and installs its dependencies.
# 30 Jun 2013
# Ibrahim Muhammad
# http://ibrahimmuhammad.com
# install node prereqs
sudo apt-get install python-software-properties python g++ make
@andkerosine
andkerosine / raskell.rb
Created Aug 15, 2012
Haskell-like list comprehensions in Ruby
View raskell.rb
$stack, $draws = [], {}
def method_missing *args
return if args[0][/^to_/]
$stack << args.map { |a| a or $stack.pop }
$draws[$stack.pop(2)[0][0]] = args[1] if args[0] == :<
end
class Array
def +@
@jxson
jxson / README.md
Created Feb 10, 2012
README.md template
View README.md

Synopsis

At the top of the file there should be a short introduction and/ or overview that explains what the project is. This description should match descriptions added for package managers (Gemspec, package.json, etc.)

Code Example

Show what the library does as concisely as possible, developers should be able to figure out how your project solves their problem by looking at the code example. Make sure the API you are showing off is obvious, and that your code is short and concise.

Motivation

@mattbrictson
mattbrictson / Gemfile
Created Jan 26, 2012
Install Compass in Rails 3.1/3.2
View Gemfile
group :assets do
gem 'compass-rails','~> 1.0.0.rc.2'
gem 'compass-colors'
gem 'sassy-buttons'
gem 'sass-rails', '~> 3.2.3'
# non-compass gems omitted for brevity
end
@mattbierbaum
mattbierbaum / setup.py
Created Sep 2, 2011
Simple SWIG/numpy example
View setup.py
from distutils.core import setup, Extension
import numpy
import os
os.environ['CC'] = 'g++';
setup(name='matt_simple_test', version='1.0', ext_modules =[Extension('_simple',
['simple.cc', 'simple.i'], include_dirs = [numpy.get_include(),'.'])])
@sirupsen
sirupsen / vim7.3_mac_install.rb
Created Jul 27, 2011 — forked from pengwynn/vim7.3_mac_install.rb
Script to install Vim 7.3 with ruby support for Mac OS X Lion
View vim7.3_mac_install.rb
# requires root permissions in /usr/bin/
star = String.new
8.times { star += "*" }
Star = "\n#{star * 3}\n"
def newblock string
puts "\n#{Star}#{string}#{Star}\n"
end
@felixalias
felixalias / migrate_s3.rake
Created Apr 17, 2011
rake task to migrate paperclip attachments to Amazon S3
View migrate_s3.rake
namespace :attachments do
task :migrate_to_s3 => :environment do
require 'aws/s3'
# Load credentials
s3_options = YAML.load_file(File.join(Rails.root, 'config/s3.yml')).symbolize_keys
bucket = s3_options[:bucket_name]
# Establish S3 connection
@mrrooijen
mrrooijen / Capistrano-Deployment-Recipe.rb
Created Jul 29, 2009
a "base" Capistrano Rails Deployment Recipe. Use it to deploy your Rails application. It is also easily expandable. So feel free to grab this Recipe and add your own tasks/customization!
View Capistrano-Deployment-Recipe.rb
# Guide
# Configure the essential configurations below and do the following:
#
# Repository Creation:
# cap deploy:repository:create
# git add .
# git commit -am "initial commit"
# git push origin master
#
# Initial Deployment:
You can’t perform that action at this time.