Skip to content

Instantly share code, notes, and snippets.

View mikehelland's full-sized avatar

mikehelland mikehelland

View GitHub Profile
server {
listen 80;
server_name sysmon.tecmint.lan;
location / {
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header Host $http_host;
proxy_pass http://192.168.43.31:5000;
}
}
@mikehelland
mikehelland / setup_node.sh
Last active May 6, 2020 03:22
setup node
sudo apt-get install curl git
sudo apt-get install build-essential
curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash -
sudo apt-get install nodejs
node -v
npm -v
# cerbot
sudo apt-get update
sudo apt-get install software-properties-common
adduser username
usermod -aG sudo username
passwd -d root
@mikehelland
mikehelland / port_setup.sh
Last active August 21, 2020 16:52
node port forwarding
# don't do this until you've got certbot run, otherwise it won't validate
sudo iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 443 -j REDIRECT --to-port 8081
sudo iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 8080
sudo apt install iptables-persistent
# if you need to remove the port forwarding for certbot, these commands list and delete the routes
# sudo iptables -t nat -L --line-numbers
# sudo iptables -t nat -D PREROUTING 2
sudo ufw allow 8081/tcp
@mikehelland
mikehelland / setup_coturn.sh
Last active July 20, 2020 00:41
Setup a coturn server
sudo apt-get install coturn
sudo systemctl stop coturn
sudo nano /etc/default/coturn
#TURNSERVER_ENABLED=1
sudo mv /etc/turnserver.conf /etc/turnserver.conf.original
sudo nano /etc/turnserver.conf
# see contents below
@mikehelland
mikehelland / omg_song_simple.json
Created November 24, 2017 07:09
OMG Data Format - Song - Simple
{
"name": "(untitled)",
"type": "SONG",
"sections": [],
"created_at": 1511489481132,
"last_modified": 1511489481132,
"id": 290
}
@mikehelland
mikehelland / omg_song.json
Created November 24, 2017 07:08
OMG Data Format - Song
{
"name": "(untitled)",
"type": "SONG",
"sections": [
{
"id": 283,
"tags": "dark bassey titan",
"type": "SECTION",
"beats": 8,
"parts": [
@mikehelland
mikehelland / omg_section_simple.json
Last active November 24, 2017 07:12
OMG Data Format - Section - Simple
{
"tags": "cool jam",
"type": "SECTION",
"beats": 4,
"measures": 2,
"scale": "0,3,5,6,7,10",
"ascale": [0,3,5,6,7,10],
"shuffle": 0,
"rootNote": 0,
"subbeats": 4,
@mikehelland
mikehelland / omg_section.json
Created November 24, 2017 07:01
OMG Data Format - Sections
{
"tags": "cool jam",
"type": "SECTION",
"beats": 4,
"measures": 2,
"scale": "0,3,5,6,7,10",
"ascale": [0,3,5,6,7,10],
"shuffle": 0,
"rootNote": 0,
"subbeats": 4,
@mikehelland
mikehelland / omg_melodybassline.json
Last active November 24, 2017 11:05
OMG Data Format Melody/Bassline
{
"type": "PART",
"notes": [
{
"note": 12,
"rest": false,
"beats": 0.25
},
{
"note": 13,