Skip to content

Instantly share code, notes, and snippets.

#!/bin/sh
# Some things taken from here
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
# Set the colours you can use
black='\033[0;30m'
white='\033[0;37m'
red='\033[0;31m'
green='\033[0;32m'
@laranea
laranea / hb-test.py
Last active August 29, 2015 14:06 — forked from takeshixx/hb-test.py
#!/usr/bin/env python2
"""
Author: takeshix <takeshix@adversec.com>
PoC code for CVE-2014-0160. Original PoC by Jared Stafford (jspenguin@jspenguin.org).
Supportes all versions of TLS and has STARTTLS support for SMTP,POP3,IMAP,FTP and XMPP.
"""
import sys,struct,socket
from argparse import ArgumentParser
@laranea
laranea / demo.py
Last active August 29, 2015 14:07 — forked from andylolz/demo.py
import election_data
from match import match
'''
Match BBC constituency names with TheyWorkForYou constituency names,
using MP name and party as extra queues
'''
twfy_data = election_data.get_twfy_data()
twfy_fields = ('party', 'name', 'constituency')
from ftplib import FTP
import ftplib
from datetime import datetime
import os
import pickle
FTP_SERVER = '83.247.110.3'
FTP_FOLDER = '/'
DESTINATION = '/volume1/Cluster/data/nl-traffic/'
#DESTINATION = 'out/'
@laranea
laranea / gulpfile.js
Created May 7, 2017 09:16 — forked from tlancina/gulpfile.js
A Gulpfile for Ionic 2 starters
/******************************************************************************
* Gulpfile
* Be sure to run `npm install` for `gulp` and the following tasks to be
* available from the command line. All tasks are run using `gulp taskName`.
******************************************************************************/
// node module imports
var gulp = require('gulp'),
webpack = require('webpack'),
sass = require('gulp-sass'),
@laranea
laranea / gulpfile.js
Created May 7, 2017 09:16 — forked from tlancina/gulpfile.js
A Gulpfile for Ionic 2 starters
/******************************************************************************
* Gulpfile
* Be sure to run `npm install` for `gulp` and the following tasks to be
* available from the command line. All tasks are run using `gulp taskName`.
******************************************************************************/
// node module imports
var gulp = require('gulp'),
webpack = require('webpack'),
sass = require('gulp-sass'),
@laranea
laranea / tmux-cheatsheet.markdown
Created June 27, 2017 20:24 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@laranea
laranea / tmux-cheatsheet.markdown
Created June 27, 2017 20:24 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@laranea
laranea / share-vpn.sh
Created August 16, 2017 14:41 — forked from ddm/share-vpn.sh
Share openvpn/tunnelblick connection on Mac OSX Sierra
#!/usr/bin/env bash
DIR=`dirname $0`
echo 'nat on en0 from $localnet to any -> (en0)' > $DIR/share-vpn.rules
sudo pfctl -f $DIR/share-vpn.rules -e
echo "Use 'sudo pfctl -F all' to clear NAT rules"
@laranea
laranea / stages.md
Created February 27, 2018 10:22 — forked from lestrrat/stages.md
Seven Stages of Becoming a Go Programmer
  • stage 1: You believe you can make Go do object oriented programming. You want to do this by using clever struct embedding.
  • stage 2: You believe goroutines will solve all of your problems. You want to use goroutines for anything and everything that you can, who cares if the code becomes a bit more complicated
  • stage 3: You believe that instead of object oriented programming, interfaces will solve all of your problems. You want to define everything in terms of interfaces
  • stage 4: You believe channels will solve all of your problems. You want to do everything from synchronization, returning values, and flow control using channels.
  • stage 5: You now believe Go is not as powerful as people claim it to be. You feel like you're stripped of all of the nice tools and constructs that other languages provide.
  • stage 6: You realize that stages 1~5 were all just your imagination. You just didn't want to accept the Go way. Everything starts to make sense.
  • stage 7: You are now at peace