Instantly share code, notes, and snippets.

View machine-enter
#!/bin/sh
usage() {
echo "usage: " >&2
echo " machine-neter MACHINE-NAME [commands ...]" >&2
}
if [ "$#" -lt 1 ]; then
usage
exit 1
View win-cvn.ahk
#IfWinActive ahk_class mintty
#c::Send,^+c
#v::Send,^+v
#n::Send,^+n
#IfWinNotActive ahk_exe mstsc.exe
#a::Send,^a
#c::Send,^c
#v::Send,^v
#n::Send,^n
View sum.cpp
#include <stdio.h>
template <typename T> T get_additive_identity(T* x) {};
template <> int get_additive_identity(int* x) { return 0;};
template <> double get_additive_identity(double* x) { return 0.0;};
template <typename T> T sum(T* X, int N) {
T s = get_additive_identity(X);
for (int i = 0; i < N; i++) {
s += X[i];
View run-at
#!/bin/sh
EX_USAGE=64
EX_DATAERR=65
WAKEUP_BEFORE_S=10
BUSYLOOP_SLEEP_US=500000
usage_exit() {
echo "Usage: $0 [-xf] time command args..." 1>&2
View scapy_layer-_gtp.py
## This file is not now part of Scapy
## Look iniqua.com for more informations
## ffranz <ffranz@iniqua.com>
## This program is published under a GPLv2 license
import time
import logging
from scapy.packet import *
from scapy.fields import *