Skip to content

Instantly share code, notes, and snippets.

" Fuck you, help key.
set fuoptions=maxvert,maxhorz
inoremap <F1> <ESC>:set invfullscreen<CR>a
nnoremap <F1> :set invfullscreen<CR>
vnoremap <F1> :set invfullscreen<CR>
@flyingoctopus
flyingoctopus / announce_party.js
Created March 14, 2011 21:20
how awesome is this code?
announce_party: function(cb_name, info)
{
info = this.parse_flash_args(info);
var publishHref = window.location.href.split('?')[0];
var chr;
if (info.screen != '' && info.screen != undefined)
{
if (publishHref.indexOf("?")!=-1) {
chr = "&";
}
@flyingoctopus
flyingoctopus / coffee-stained-paper.js
Created August 31, 2011 23:33 — forked from mnmly/coffee-stained-paper.js
A tiny shim for Paper.js/CoffeeScript prototyping
window.stainedPaper = function (func) {
var canvas = document.createElement('canvas');
document.body.appendChild(canvas);
paper.setup(canvas);
func.call(paper);
};
@flyingoctopus
flyingoctopus / .inputrc
Created September 8, 2011 18:57 — forked from tpope/.inputrc
Basic amenities for vi readline bindings
set keymap vi-insert
Control-a: beginning-of-line
Control-b: backward-char
Control-d: delete-char
Control-e: end-of-line
Control-f: forward-char
Control-k: kill-line
Control-n: next-history
Control-p: previous-history
set keymap emacs-ctlx
@flyingoctopus
flyingoctopus / archive_github_repo.sh
Created October 17, 2011 22:55 — forked from pgib/archive_github_repo.sh
Put this in your shell's respective dot profile and smoke it!
archive_github_repo()
{
if [ ! -d .git ]; then
echo "You must run this from within the root of your git repo."
exit 1
fi
pwd=`pwd`
repo_url=`git config --local --get remote.origin.url`
repo_name=`echo $repo_url | awk -F / '{print $2}' | sed -e s/.git//`
http://www.yourawesomesite.com/index.html?name=<script>alert('You just found a XSS vulnerability')</script>
@flyingoctopus
flyingoctopus / outside_temp.rb
Created November 11, 2011 01:19 — forked from pgib/outside_temp.rb
Get me some temperatures for screen's backtick!
#!/usr/bin/env ruby
# encoding: UTF-8
require 'rubygems'
# https://github.com/jnunemaker/google-weather/
# gem install google-weather
require 'google_weather'
# usage: outside_temp.rb [City,Province|Postal Code]
if ARGV.size == 0
@flyingoctopus
flyingoctopus / osx_lion_rail_setup.md
Created March 7, 2012 07:36 — forked from jpantuso/osx_lion_rail_setup.md
Setup OS X 10.7 w/ homebrew, oh-my-zsh, rvm, rails, and MySQL
@flyingoctopus
flyingoctopus / README.md
Created March 22, 2012 06:54 — forked from tjogin/README.md
Configuration file to use PHP with Ruby rack

Installation

First you need php-cgi, i used brew with Formula below:

$ curl -O https://raw.github.com/gist/1194269/7ae1709453a8a19ce9c030bf41d544dd08d96d85/php.rb
$ mv php.rb `brew --prefix`/Library/Formula
$ brew install php --with-mysql

Second, install this ruby gems:

@flyingoctopus
flyingoctopus / posterous.rb
Created March 30, 2012 17:43
posterous > jekyll
require 'rubygems'
require 'jekyll'
require 'fileutils'
require 'net/http'
require 'uri'
require "json"
module Jekyll
module Posterous
def self.fetch(uri_str, limit = 10)