Skip to content

Instantly share code, notes, and snippets.

@LambdaSix
LambdaSix / HttpServer.py
Created March 15, 2013 17:18
RestHTTP with SHA-1 auth tokens.
import bottle
from bottle import run, post, get, request, HTTPError
import json
import re
import hashlib
import os
userLogins = {}
@post('/post/')
@efeminella
efeminella / killvpn
Created April 2, 2013 17:03
Kill Cisco VPN process (useful for which would otherwise require a system restart).
function killvpn() {
ps -ef | grep racoon | grep -v grep | awk '{print $2}' | xargs kill -9
}
@LambdaSix
LambdaSix / comprehensions.scala
Last active December 15, 2015 17:59
Scala for-comprehension
class Person(val name: String, val female: Boolean)
val people = List(
new Person("Cliffy", false),
new Person("Ewing", true),
new Person("Tolkein", false),
new Person("Donna", true))
// Traverse the list and print the names
for (person <- people)