Skip to content

Instantly share code, notes, and snippets.

View brentfisher's full-sized avatar
🥂
Let's get to work!

brentfisher

🥂
Let's get to work!
View GitHub Profile
alert('testing123');
(function(global){"use strict";if(global.Base64)return;var version="2.1.2";var buffer;if(typeof module!=="undefined"&&module.exports){buffer=require("buffer").Buffer}var b64chars="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";var b64tab=function(bin){var t={};for(var i=0,l=bin.length;i<l;i++)t[bin.charAt(i)]=i;return t}(b64chars);var fromCharCode=String.fromCharCode;var cb_utob=function(c){if(c.length<2){var cc=c.charCodeAt(0);return cc<128?c:cc<2048?fromCharCode(192|cc>>>6)+fromCharCode(128|cc&63):fromCharCode(224|cc>>>12&15)+fromCharCode(128|cc>>>6&63)+fromCharCode(128|cc&63)}else{var cc=65536+(c.charCodeAt(0)-55296)*1024+(c.charCodeAt(1)-56320);return fromCharCode(240|cc>>>18&7)+fromCharCode(128|cc>>>12&63)+fromCharCode(128|cc>>>6&63)+fromCharCode(128|cc&63)}};var re_utob=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g;var utob=function(u){return u.replace(re_utob,cb_utob)};var cb_encode=function(ccc){var padlen=[0,2,1][ccc.length%3],ord=ccc.charCodeAt(0)<<16|(ccc.l
@brentfisher
brentfisher / gist:8483758
Created January 17, 2014 23:41
Post-Commit Git Trigger - Post to HipChat
#!/bin/sh
#coded in VIM
echo 'posting to hipchat'
repo=$(basename $(echo $PWD|cut -d/ -f1,2,3,4))
var=$(cat<<EOF
<strong>$(git config --list | grep user.name | cut -d\= -f 2)</strong>
<span>pushed the following changes to:
$(echo ${repo})
@brentfisher
brentfisher / pixel_writer.rb
Created February 6, 2014 00:48
Simple Pixel Middleware
module CBVisitorTracker
module MiddleWare
class PixelWriter
def initialize(appl)
@app = appl
end
def call(env)
response= @app.call(env)
status,headers,body= response
headers['Content-Length']= body.length.to_s
@brentfisher
brentfisher / gist:9279124
Created February 28, 2014 20:25
Infinite curl to node with base64 payload
while true; do
curl http://localhost:8081/track/\?event\=QklEPVgxOTUzMTJEMzBCOTUxOUFDOEM5RUMxNDUxRDY3QzExOThFQUVEQzJBRjA3Q0MyQzRBNzZDMjk1QjhBODEwOEMxMDM5RUM0Qjk2N0QxNTI3QkQ2NkJDOThENTQ4ODYyOTMxJkNPTlRFTlRfTEVOR1RIPTAmSFRUUF9IT1NUPW0uY2FyZWVyYnVpbGRlci5jb20mSFRUUF9SRUZFUkVSPWh0dHA6Ly9tLmNhcmVlcmJ1aWxkZXIuY29tLyZIVFRQX1VTRVJfQUdFTlQ9TW96aWxsYS81LjAgKGlQaG9uZTsgQ1BVIGlQaG9uZSBPUyA3XzAgbGlrZSBNYWMgT1MgWCkgQXBwbGVXZWJLaXQvNTM3LjUxLjEgKEtIVE1MLCBsaWtlIEdlY2tvKSBWZXJzaW9uLzcuMCBNb2JpbGUvMTFBNDY1IFNhZmFyaS85NTM3LjUzJk9SSUdJTkFMX0ZVTExQQVRIPS9qb2JzP2tleXdvcmRzPVJuJmxvY2F0aW9uPUthbnNhcytDaXR5JTJDK01PKzY0MTU2Jm1vYmlsZV9vbmx5PWZhbHNlJlFVRVJZX1NUUklORz1rZXl3b3Jkcz1SbiZsb2NhdGlvbj1LYW5zYXMrQ2l0eSUyQytNTys2NDE1NiZtb2JpbGVfb25seT1mYWxzZSZSRU1PVEVfQUREUj0xMC4wLjEwMC4yMzkmUkVRVUVTVF9NRVRIT0Q9R0VUJlJFUVVFU1RfVVJJPS9qb2JzP2tleXdvcmRzPVJuJmxvY2F0aW9uPUthbnNhcytDaXR5JTJDK01PKzY0MTU2Jm1vYmlsZV9vbmx5PWZhbHNlJlZJRD1WUlRaMVE5NzdLOEZIM0c2NzU0RyZjaXR5PUthbnNhcyBDaXR5JmpvYl9yZXN1bHRzPUpCNzVLNzY0RlE3VlpOTFMzTEMsSkhMNFAyNlRUWkwwQ0ROWENWMCx
@brentfisher
brentfisher / vimrc.bundles
Created April 22, 2014 04:04
Vundle dotfile
" ge Vundle
" required!
Bundle 'gmarik/vundle'
" My Bundles here:
Bundle 'git://github.com/markabe/bufexplorer.git'
Bundle 'tomtom/tcomment_vim'
Bundle 'git://github.com/Shougo/unite.vim.git'
Bundle 'jcf/vim-latex'
@brentfisher
brentfisher / .vimrc
Created April 20, 2015 19:09
Sample .VIMRC
set noswapfile " removes annoying .swp files when opening the same file multiple times
set number " line numbers
syntax on " try to autoread syntax (based on filename)
" relative line numbers below > VIM 7.4
" set relativenumber
" Tab stuff, I perfer to use two spaces instead of hard tabs
set tabstop=2 " this is when you open a file with hard tabs in it, <TAB>
set softtabstop=2 " these are tabs when editing, so pressing TAB in insert mode
@brentfisher
brentfisher / .vimrc
Created April 20, 2015 19:09
Sample .VIMRC
set noswapfile " removes annoying .swp files when opening the same file multiple times
set number " line numbers
syntax on " try to autoread syntax (based on filename)
" relative line numbers below > VIM 7.4
" set relativenumber
" Tab stuff, I perfer to use two spaces instead of hard tabs
set tabstop=2 " this is when you open a file with hard tabs in it, <TAB>
set softtabstop=2 " these are tabs when editing, so pressing TAB in insert mode
@brentfisher
brentfisher / .vimrc
Created April 20, 2015 19:09
Sample .VIMRC
set noswapfile " removes annoying .swp files when opening the same file multiple times
set number " line numbers
syntax on " try to autoread syntax (based on filename)
" relative line numbers below > VIM 7.4
" set relativenumber
" Tab stuff, I perfer to use two spaces instead of hard tabs
set tabstop=2 " this is when you open a file with hard tabs in it, <TAB>
set softtabstop=2 " these are tabs when editing, so pressing TAB in insert mode
@brentfisher
brentfisher / .vimrc
Created April 20, 2015 19:09
Sample .VIMRC
set noswapfile " removes annoying .swp files when opening the same file multiple times
set number " line numbers
syntax on " try to autoread syntax (based on filename)
" relative line numbers below > VIM 7.4
" set relativenumber
" Tab stuff, I perfer to use two spaces instead of hard tabs
set tabstop=2 " this is when you open a file with hard tabs in it, <TAB>
set softtabstop=2 " these are tabs when editing, so pressing TAB in insert mode
@brentfisher
brentfisher / .vimrc
Created April 20, 2015 19:09
Sample .VIMRC
set noswapfile " removes annoying .swp files when opening the same file multiple times
set number " line numbers
syntax on " try to autoread syntax (based on filename)
" relative line numbers below > VIM 7.4
" set relativenumber
" Tab stuff, I perfer to use two spaces instead of hard tabs
set tabstop=2 " this is when you open a file with hard tabs in it, <TAB>
set softtabstop=2 " these are tabs when editing, so pressing TAB in insert mode