Skip to content

Instantly share code, notes, and snippets.

View OwenBrotherwood's full-sized avatar

Owen Brotherwood OwenBrotherwood

View GitHub Profile
from microbit import *
def RN2483_Reset(): # Reset RN2483
display.show("R")
pin3.write_digital(1)
pin3.write_digital(0)
sleep(100)
pin3.write_digital(1)
sleep(100)
#RN2483_GetResponse()
@OwenBrotherwood
OwenBrotherwood / MakeOpenVPN.sh
Last active August 29, 2015 14:28 — forked from laurenorsini/MakeOpenVPN.sh
MakeOpenVPN.sh by Eric Jodoin
#!/bin/bash
# Default Variable Declarations
DEFAULT="Default.txt"
FILEEXT=".ovpn"
CRT=".crt"
KEY=".3des.key"
CA="ca.crt"
TA="ta.key"
@OwenBrotherwood
OwenBrotherwood / server.conf
Last active August 29, 2015 14:28 — forked from laurenorsini/server.conf
OpenVPN configuration for /etc/openvpn/server.conf
#local 192.168.2.0 # SWAP THIS NUMBER WITH YOUR RASPBERRY PI IP ADDRESS :: however, this is an optional statement and not needed
dev tun
proto udp #Some people prefer to use tcp. Don't change it if you don't know.
port 1194
ca /etc/openvpn/easy-rsa/keys/ca.crt
cert /etc/openvpn/easy-rsa/keys/Server.crt # SWAP WITH YOUR CRT NAME
key /etc/openvpn/easy-rsa/keys/Server.key # SWAP WITH YOUR KEY NAME
dh /etc/openvpn/easy-rsa/keys/dh1024.pem # If you changed to 2048, change that here!
server 10.8.0.0 255.255.255.0
# server and remote endpoints
@OwenBrotherwood
OwenBrotherwood / audit
Created May 24, 2015 16:16
pulkitsinghal audit
pulkitsinghal
// -- Add your pre-processing middleware here --
app.all('/api/*', function auditApiCalls(req, res, next) {
if (req.accessToken) {
log('url:', req.originalUrl, 'userId:', req.accessToken.id, 'token:', JSON.stringify(req.accessToken,null,0));
}
else {
log('url:', req.originalUrl, 'token:', req.accessToken);
}
next();