View paper.vim
" paper.vim - Vim color scheme for 16-color terminals
" --------------------------------------------------------------
" Author: Adrian Nilsson
" Version: 0.0.1
" --------------------------------------------------------------
set background=light
hi! clear
if exists("syntax_on")
View Makefile
all:consumer producer
CPPFLAGS+=-std=c++03 -Wall -pedantic
CPPFLAGS+=-isystem ~/custom/boost/
LDFLAGS+=-L ~/custom/boost/stage/lib/ -Wl,-rpath,/home/sehe/custom/boost/stage/lib
LDFLAGS+=-lboost_system -lrt -lpthread
View whatsapp_phone_enumerator_floated_div.js
PoC WhatsApp enumeration of phonenumbers, profile pics, about texts and online statuses
Floated div edition
(c) 2017 - Loran Kloeze -
This script creates a UI on top of the WhatsApp Web interface. It enumerates certain kinds
of information from a range of phonenumbers. It doesn't matter if these numbers are part
of your contact list. At the end a table is displayed containing phonenumbers, profile pics,
about texts and online statuses. The online statuses are being updated every
View pre-commit
# Modified 2015, Austin Dizzy
# Copyright 2012 The Go Authors. All rights reserved.
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
# git gofmt pre-commit hook
# To use, store as .git/hooks/pre-commit inside your repository and make sure
# it has execute permissions.
View pre-commit
matches=$(git diff --cached | grep -E '\+.*?FIXME')
if [ "$matches" != "" ]
echo "'FIXME' tag is detected."
echo "Please fix it before committing."
echo " ${matches}"
exit 1

Virtual Hosts on nginx (CSC309)

When hosting our web applications, we often have one public IP address (i.e., an IP address visible to the outside world) using which we want to host multiple web apps. For example, one may wants to host three different web apps respectively for,, and on the same machine using a single IP address.

How can we do that? Well, the good news is Internet browsers

View channel-example.swift
import Foundation
go(println("in a thread"))
// buffered channel
var c = Chan(buffer:20)
// sending routing
go {
while(true) {
View _ff-addon-snippet-CF_QueryWorkspaceLockedInterval.js
if (typeof myint == 'undefined') {
var myint = null;
function doit(){
if (myint === null) {
myint = setInterval(function() {
var lib = {
CoreGraphics: '/System/Library/Frameworks/CoreGraphics.framework/CoreGraphics',
CoreFoundation: '/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation'
View preprocessor_fun.h
// Just before switching jobs:
// Add one of these.
// Preferably into the same commit where you do a large merge.
// This started as a tweet with a joke of "C++ pro-tip: #define private public",
// and then it quickly escalated into more and more evil suggestions.
// I've tried to capture interesting suggestions here.
// Contributors: @r2d2rigo, @joeldevahl, @msinilo, @_Humus_,
// @YuriyODonnell, @rygorous, @cmuratori, @mike_acton, @grumpygiant,
View event_source.ex
def index(conn, %{"event" => "true"}) do
conn = conn
|> put_resp_content_type("text/event-stream")
|> send_chunked(200)
{:ok, conn} = chunk(conn, ["data: ", JSON.encode!(Thermostat.Data.get()), "\n\n"])
Phoenix.Topic.subscribe self, "data"
defp data_updated(conn) do