Skip to content

Instantly share code, notes, and snippets.

@keks
keks / dcbl1.info
Created November 9, 2011 23:10
drupal theme fuckup
name = dcbl1
description = Theme fuer db-events.de
core = 7.x
stylesheets[all][] = style.css
@keks
keks / sshag.sh
Created January 30, 2013 13:00
finding running ssh agents
#!/bin/sh
now=`date +%s`
stattime=`stat -c'%Z' /tmp/sshag.$USER`
uptime=`cat /proc/uptime | cut -d. -f1`
if [ 0 -lt $[ $now - $stattime - $uptime] ]; then
ssh-agent > /tmp/sshag.$USER
chmod 600 /tmp/sshag.$USER
fi
@keks
keks / genkey
Last active August 29, 2015 14:01
#!/bin/bash
n1=1250
n2=2500
n3=3750
n4=5000
n5=6250
n6=7500
n7=8750
n8=10000
@keks
keks / boom.go
Created December 5, 2014 19:17
Gist for that bencode issue
package main
import (
"fmt"
"github.com/zeebo/bencode"
)
type Foo struct {
Name string
Stuff interface{}
@keks
keks / fetch.go
Last active August 29, 2015 14:12 — forked from cryptix/fetch.go
package main
import (
"crypto/sha1"
"fmt"
"io"
"net/http"
"os"
"strings"
"sync"
#!/bin/bash
#
# Parses DHCP options from openvpn to update resolv.conf
# To use set as 'up' and 'down' script in your openvpn *.conf:
# up /etc/openvpn/update-resolv-conf
# down /etc/openvpn/update-resolv-conf
#
# Used snippets of resolvconf script by Thomas Hood <[email protected]>
# and Chris Hanson
# Licensed under the GNU GPL. See /usr/share/common-licenses/GPL.
package commands
// ...
func (cmd *Command) Call(r Request, w io.Writer) error {
// ...
res := NewResponse(r, w) // pass the writer
cmd.Run(...)
type ResponseEmitter interface {
// closes http conn or channel
io.Closer
// Set/Return the response Error
SetError(err error, code ErrorType)
// Gets Stdout and Stderr, for writing to console without using SetOutput
Stdout() io.Writer
Stderr() io.Writer
@keks
keks / halfway.log
Created January 19, 2017 20:17
Output of tamarin-prover on the halfway branch of tamarin-shs
maude tool: 'maude'
checking version: 2.7. OK.
checking installation: OK.
theory SHS begin
// Function signature and definition of the equational theory E
builtins: diffie-hellman
functions: ed2cv/1, fst/1, h/1, mac/2, macv/3, pair/2, pk/1, sdec/2,
maude tool: 'maude'
checking version: 2.7. OK.
checking installation: OK.
theory SHS begin
// Function signature and definition of the equational theory E
builtins: diffie-hellman
functions: ed2cv/1, fst/1, h/1, mac/2, macv/3, pair/2, pk/1, sdec/2,