Skip to content

Instantly share code, notes, and snippets.

I've been following this nstx tutorial. I set up a server on tunnel.nix.is. It's set up to use the tun1 interface there. See also this tutorial for iodine.

Since the server is also a shadow DNS master for several domains I compiled a custom nstxd that listens on port 5252/udf instead of 53/udp. So these are the listening processes:

$ sudo netstat -ldnp | grep :5[23]

/* Copied, Pasted and summarized from ps' source code.
You can use sysctl to get other process' argv.
*/
#include <sys/sysctl.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define pid_of(pproc) pproc->kp_proc.p_pid
@mlhaufe
mlhaufe / ShellBrowse.vbs
Last active November 8, 2024 19:36
VBScript File Browser
Option Explicit
' Flags for the options parameter
Const BIF_returnonlyfsdirs = &H0001
Const BIF_dontgobelowdomain = &H0002
Const BIF_statustext = &H0004
Const BIF_returnfsancestors = &H0008
Const BIF_editbox = &H0010
Const BIF_validate = &H0020
Const BIF_browseforcomputer = &H1000
@andsens
andsens / bootstrap_homeshick.sh
Last active September 28, 2025 23:30
Script that can set up an entire user account with homeshick automatically
#!/bin/bash -ex
# Paste this into ssh
# curl -sL https://gist.github.com/andsens/2913223/raw/bootstrap_homeshick.sh | tar -xzO | /bin/bash -ex
# When forking, you can get the URL from the raw (<>) button.
### Set some command variables depending on whether we are root or not ###
# This assumes you use a debian derivate, replace with yum, pacman etc.
aptget='sudo apt-get'
chsh='sudo chsh'
@pitch-gist
pitch-gist / gist:2999707
Created June 26, 2012 22:21
HTML: Simple Maintenance Page
<!doctype html>
<title>Site Maintenance</title>
<style>
body { text-align: center; padding: 150px; }
h1 { font-size: 50px; }
body { font: 20px Helvetica, sans-serif; color: #333; }
article { display: block; text-align: left; width: 650px; margin: 0 auto; }
a { color: #dc8100; text-decoration: none; }
a:hover { color: #333; text-decoration: none; }
</style>
@lamberta
lamberta / vbox.sh
Created August 6, 2012 04:31
Convenience wrapper around VBoxManage for controlling VirtualBox virtual machines.
#!/usr/bin/env bash
# Convenience wrapper around VBoxManage for controlling VirtualBox virtual machines.
#
# Headless Ubuntu server gets stuck at boot menu on unsuccessful boots:
# http://serverfault.com/questions/243343/headless-ubuntu-server-machine-sometimes-stuck-at-grub-menu
function print_help {
echo "Usage: $(basename $0) [options] name"
echo "Easy control of VirtualBox virtual machines."
echo " -h Show this usage guide."
@zziuni
zziuni / stuns
Created September 18, 2012 08:05
STUN server list
# source : http://code.google.com/p/natvpn/source/browse/trunk/stun_server_list
# A list of available STUN server.
stun.l.google.com:19302
stun1.l.google.com:19302
stun2.l.google.com:19302
stun3.l.google.com:19302
stun4.l.google.com:19302
stun01.sipphone.com
stun.ekiga.net
@carno
carno / gist:3979724
Created October 30, 2012 11:33
How does bash differ from sh, the Bourne shell?
# http://www.unixguide.net/unix/bash/C1.shtml
How does bash differ from sh, the Bourne shell?
This is a non-comprehensive list of features that differentiate bash
from the SVR4.2 shell. The bash manual page explains these more
completely.
Things bash has that sh does not:
@amitsaha
amitsaha / picloud_rest.c
Last active August 15, 2022 06:35
PiCloud REST call from C using libcurl
/* Invokes a published function in PiCloud and then
retrieves the results.
Uses libcurl. Compile using the -lcurl flag.
See: http://echorand.me/2012/01/27/picloud-and-rest-api-with-c-client/
*/
#include <stdio.h>
#include <curl/curl.h>
#include <string.h>
@roxlu
roxlu / install_cygwin_sshd.txt
Last active June 15, 2025 12:19
Installing CYGWIN + SSHD for remote access through SSH on windows
Installing CYGWIN with SSH
1) Download cygwin setup.exe from http://www.cygwin.com
- Execute setup.exe
- Install from internet
- Root directory: `c:\cygwin` + all users
- Local package directory: use default value
- Select a mirror to download files from
- Select these packages:
- editors > xemacs 21.4.22-1
- net > openssh 6.1-p