Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
#define _GNU_SOURCE | |
#include <unistd.h> | |
#include <sys/syscall.h> | |
#include <sys/types.h> | |
#include <sys/utsname.h> | |
#include <stdio.h> | |
#include <string.h> | |
int uname(struct utsname *buf) |
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
''' | |
Generate DHCP Option 121 hex routing configurations | |
Static routes pushed over DHCP | |
1) Set option 121. | |
2) Value is the concatenation of hex route data. | |
3) Each route has the form: | |
{prefix_length}{destination_prefix}{router} |
// A small SSH daemon providing bash sessions | |
// | |
// Server: | |
// cd my/new/dir/ | |
// #generate server keypair | |
// ssh-keygen -t rsa | |
// go get -v . | |
// go run sshd.go | |
// | |
// Client: |
#!/bin/bash | |
# Define physical ethernet interface to be bridged | |
# with TAP interface(s) above. | |
eth="eth0" | |
eth_ip="192.168.42.2" | |
eth_netmask="255.255.255.0" | |
eth_broadcast="192.168.42.255" | |
eth_gateway="192.168.42.1" | |
eth_mac="XX:XX:XX:XX:XX:XX" |
# Key considerations for algorithm "RSA" ≥ 2048-bit
openssl genrsa -out server.key 2048
# Key considerations for algorithm "ECDSA" ≥ secp384r1
# List ECDSA the supported curves (openssl ecparam -list_curves)
package main | |
import ( | |
"flag" | |
"fmt" | |
"net/url" | |
"strings" | |
) | |
type UrlFlag struct { |
func split(buf []byte, lim int) [][]byte { | |
var chunk []byte | |
chunks := make([][]byte, 0, len(buf)/lim+1) | |
for len(buf) >= lim { | |
chunk, buf = buf[:lim], buf[lim:] | |
chunks = append(chunks, chunk) | |
} | |
if len(buf) > 0 { | |
chunks = append(chunks, buf[:len(buf)]) | |
} |
Byobu is a suite of enhancements to tmux, as a command line | |
tool providing live system status, dynamic window management, | |
and some convenient keybindings: | |
F1 * Used by X11 * | |
Shift-F1 Display this help | |
F2 Create a new window | |
Shift-F2 Create a horizontal split | |
Ctrl-F2 Create a vertical split | |
Ctrl-Shift-F2 Create a new session |