Skip to content

Instantly share code, notes, and snippets.

View flyingoctopus's full-sized avatar

Vincent van Haaff flyingoctopus

  • flyingoctopus
  • Vancouver, BC
View GitHub Profile
" 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 = "&";
}
1. Restart the computer. If necessary, use the reset/interrupt button.
2. Immediately after the system startup tone, press and hold the Command-Option-O-F key combination. The computer starts up to a text-only screen, indicating that you are in Open Firmware.
3. At the prompt, type: eject cd
4. Press Return.
5. Type: mac-boot
6. Press Return
@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
<script type="text/javascript">
function appReady(){
var ajax = new XMLHttpRequest();
ajax.setRequestHeader('x-http-method-override', 'get');
ajax.open("POST","http://vincentsawesomeevent.attendease.dev/api/pass_groups.json",true);
ajax.send();
ajax.onreadystatechange=function(){
if(ajax.readyState==4 && (ajax.status==200||ajax.status==0)){
document.getElementById('main').innerHTML = theHTML;
@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