Skip to content

Instantly share code, notes, and snippets.

# First install tmux
brew install tmux
# For mouse support (for switching panes and windows)
# Only needed if you are using Terminal.app (iTerm has mouse support)
Install http://www.culater.net/software/SIMBL/SIMBL.php
Then install https://bitheap.org/mouseterm/
# More on mouse support http://floriancrouzat.net/2010/07/run-tmux-with-mouse-support-in-mac-os-x-terminal-app/
@brainv
brainv / cmai.yml
Last active January 4, 2016 06:39
My ~/.teamocil/cmai.yml complete details at http://teamocil.com/
session:
name: "CMAI"
windows:
- name: "ApolloPlus"
root: "~/cmai/source/apolloplus/"
layout: main-vertical
filters:
before: "echo 'Shits!'"
after: "echo 'I am done initializing this pane.'"
panes:
@brainv
brainv / betlog_ng_matsing.txt
Last active August 29, 2015 13:56
Betlog Ng Matsing Lyrics by: Rivermaya
Betlog Ng Matsing Lyrics
by: Rivermaya
Ituring ang iyong sariling tagahawi ng ulap
Sa kalangitang kulimlim
Kampanang yayanig sa bawat nilalang
Magigising ang lupang kulang sa dilig
Ikaw ang magsasabing
Kaya mo 'to
#!/bin/bash
#
# Lee Robert's Base Ubuntu Installation script for use on Digital Ocean (Or any other ubuntu install really.)
# Made and tested with Ubuntu 13.04 64bit
#
# Steps:
# 01. Secure Root User
# 02. Make .bashrc print out pretty colors (and root's prompt will be red)
# 03. Create a local user
# 04. Update sudoers file so only root + local user can use sudo
@brainv
brainv / README.md
Created March 25, 2014 18:24 — forked from jxson/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

Fenced code blocks inside ordered and unordered lists

  1. This is a numbered list.

  2. I'm going to include a fenced code block as part of this bullet:

    Code
    More Code
    
#!/usr/bin/env python2
# Quick and dirty demonstration of CVE-2014-0160 by Jared Stafford (jspenguin@jspenguin.org)
# The author disclaims copyright to this source code.
import sys
import struct
import socket
import time
import select
function proxy () {
UNSET=""
PROXY="http://127.0.0.1:8080"
PROXY_ENV=(http_proxy https_proxy ftp_proxy HTTP_PROXY HTTPS_PROXY FTP_PROXY)
if [ $1 == on ]; then
for i in $PROXY_ENV; do
export $i=$PROXY
done
echo "proxy set"
elif [ $1 == off ]; then
@brainv
brainv / hb_honeypot.pl
Created April 20, 2014 05:42
A quick 'n dirty honeypot hack for Heartbleed
#!/usr/bin/perl
# hb_honeypot.pl -- a quick 'n dirty honeypot hack for Heartbleed
#
# This Perl script listens on TCP port 443 and responds with completely bogus
# SSL heartbeat responses, unless it detects the start of a byte pattern
# similar to that used in Jared Stafford's (jspenguin@jspenguin.org) demo for
# CVE-2014-0160 'Heartbleed'.
#
# Run as root for the privileged port. Outputs IPs of suspected heartbleed scan
var crypto = require('crypto')
, key = 'your secret key here'
, plaintext = 'Text to be encrypted'
, cipher = crypto.createCipher('aes-256-cbc', key)
, decipher = crypto.createDecipher('aes-256-cbc', key);
var encryptedPassword = cipher.update(plaintext, 'utf8', 'base64');
encryptedPassword += cipher.final('base64')
var decryptedPassword = decipher.update(encryptedPassword, 'base64', 'utf8');