cp server.conf udp.conf
cp udp.conf tcp.conf
proto udp
port 1194
| // Taken from Oona Räisänen 2013 / http://windytan.com | |
| // Adapted to work well with b64 encoded keys | |
| // ssh-keygen -lf ~/.ssh/id.pub | node emoji.js | |
| var glyphs = [ '🌀','🌂','🌅','🌈','🌙','🌞','🌟','🌠','🌰','🌱','🌲','🌳','🌴','🌵','🌷','🌸', | |
| '🌹','🌺','🌻','🌼','🌽','🌾','🌿','🍀','🍁','🍂','🍃','🍄','🍅','🍆','🍇','🍈', | |
| '🍉','🍊','🍋','🍌','🍍','🍎','🍏','🍐','🍑','🍒','🍓','🍔','🍕','🍖','🍗','🍘', | |
| '🍜','🍝','🍞','🍟','🍠','🍡','🍢','🍣','🍤','🍥','🍦','🍧','🍨','🍩','🍪','🍫', | |
| '🍬','🍭','🍮','🍯','🍰','🍱','🍲','🍳','🍴','🍵','🍶','🍷','🍸','🍹','🍺','🍻', |
| #!/bin/sh | |
| # From https://snikt.net/blog/2013/10/10/how-to-force-program-to-use-vpn-tunnel/ | |
| # Execute first : | |
| # echo "10 custom_table" >> /etc/iproute2/rt_tables | |
| # Put this in opvpn config : | |
| # route-noexec | |
| # route-up /home/p/route_up.sh |
| # Needs to be in /var/www/html/channel.yml | |
| :title: 'All About Everything' | |
| :description: 'A show about everything' | |
| :url: 'https://www.server.com/data' | |
| #!/bin/bash | |
| # Super simple raid like copy of 2 disks - Designed to be cron'd and forgotten | |
| # Made so that the "external" disk can be removed at all times | |
| # appart from when it's being used, but the backups should be fast (ran at night). | |
| # "internal" disk is at /media/raid | |
| # "external" disk is at /media/ext | |
| if [ -e /dev/disk/by-label/EXT ]; then |
From er453r on stackoverflow : http://unix.stackexchange.com/questions/143745/preprocess-packets-send-to-from-interface
compile : cc -lnetfilter_queue -lnfnetlink -o preprocess preprocess.c
tell iptables to fwd packets : sudo iptables -A OUTPUT -p udp --dport 4444 -j NFQUEUE --queue-num 0
test : nc -lu 4444 and nc -u 127.0.0.1 4444
| set-option -g status | |
| set-option -g status-position bottom | |
| set-window-option -g xterm-keys on | |
| bind-key -n S-Left previous-window | |
| bind-key -n S-Right next-window | |
| unbind C-b | |
| set -g prefix C-z |
| #include <stdio.h> | |
| #include <signal.h> | |
| int main(int argc, char *argv[]) { | |
| int pid = atoi(argv[1]); | |
| union sigval value; | |
| value.sival_int = atoi(argv[2]); | |
| // value.sival_ptr = (void*) strdup(argv[3]); |
| clear lock | |
| keycode 66 = Delete | |
| clear mod4 | |
| clear control | |
| keycode 133 = Control_L | |
| add control = Control_L |
| /* | |
| * This function prints hex dump of memory specified as a pointer. | |
| * Reference: http://stackoverflow.com/questions/7775991/how-to-get-hexdump-of-a-structure-data | |
| */ | |
| #include <stdio.h> | |
| void hexdump(void *addr, int len) | |
| { | |
| int i; | |
| unsigned char buff[17]; |