Skip to content

Instantly share code, notes, and snippets.

View hex128's full-sized avatar
👾

Hex hex128

👾
View GitHub Profile
#!/bin/sh
set -e
if [ "$#" -ne 3 ]; then
printf '%b\n' "\033[1m$0\033[0m \033[4muser\033[0m \033[4mhost\033[0m \033[4mpassword\033[0m"
exit 1
fi
user=$1
@hex128
hex128 / cli.ini
Last active November 24, 2016 22:47
Let's Encrypt Hooks
pre-hook = /usr/local/sbin/letsencrypt-pre-hook
post-hook = /usr/local/sbin/letsencrypt-post-hook
renew-hook = /usr/local/sbin/letsencrypt-renew-hook
#!/bin/sh
nc localhost 9051 <<EOF
AUTHENTICATE "localhost"
SIGNAL NEWNYM
EOF
#!/bin/sh
echo "$(date --rfc-3339=seconds) $*" >> "/var/log/letsencrypt.log"
if [ "$1" = "deploy_cert" ]; then
/bin/systemctl reload nginx
fi
#!/usr/bin/env python2
import json
import urllib2
import urlparse
import BaseHTTPServer
import signal
import sys
class Handler(BaseHTTPServer.BaseHTTPRequestHandler):
diff --git a/library/pom.xml b/library/pom.xml
index 1756f19..03bde0c 100644
--- a/library/pom.xml
+++ b/library/pom.xml
@@ -123,6 +123,10 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
+ <version>1.6</version>
+ <configuration>
@hex128
hex128 / ip-up.sh
Created August 20, 2016 13:24
PPTP route configuration script
#!/bin/sh
RELEVANT=remote
LOG=/dev/null
ROUTE=192.0.2.0/24
echo "$0 $@" >> ${LOG}
address=$4
gateway=$5
ipparam=$6
@hex128
hex128 / cors.conf
Created August 17, 2016 01:22
NGINX configuration snippets
add_header Access-Control-Allow-Origin *;
@hex128
hex128 / smarttv-debugging-server.js
Last active October 26, 2017 00:56 — forked from janmonschke/smarttv-debugging-server.js
[Improved] A simple debugging server for the Samsung SmartTV platform. Simply start the server and then connect your machine to the TV and it'll print out (and save) everything the TV sends
var net = require('net');
var fs = require('fs');
function formatFileName (addr) {
return __dirname + '/log_' + addr + '_' + Math.floor(new Date().getTime() / 1000);
}
function formatMessage (addr, message) {
return '[' + addr + '] ' + message.trim() + '\n';
}