Skip to content

Instantly share code, notes, and snippets.

Rob Dunham Nilpo

Block or report user

Report or block Nilpo

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@Nilpo
Nilpo / database.sql
Created Apr 12, 2018
A sample of a good database creation script.
View database.sql
-- -----------------------------------------------------
-- Temporarily disable key checks
-- -----------------------------------------------------
SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0;
SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0;
SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='TRADITIONAL,ALLOW_INVALID_DATES';
-- -----------------------------------------------------
-- Schema Music
-- -----------------------------------------------------
@Nilpo
Nilpo / Boot RetroPie from USB.md
Last active Apr 15, 2018
How to boot RetroPie (or Raspbian) from a USB drive on the Raspberry Pi 3 B(+)
View Boot RetroPie from USB.md

Boot RetroPie from USB on the Raspberry Pi 3 B(+)

You will need a Raspberry Pi 3 B(+) with a microSD card running RetroPie (or Raspbian).

  1. Update Raspbian.

    $ sudo apt-get update && sudo apt-get upgrade -y
@Nilpo
Nilpo / INSTALL.md
Last active Jan 13, 2019
Instal Plex on Asus Tinker Board
View INSTALL.md
  1. In terminal, upgrade TinkerOS.

    sudo apt update && apt upgrade -y
    sudo apt dist-upgrade
  2. Install avahi-daemon

@Nilpo
Nilpo / Raspberry Pi Plex Media Server.md
Last active Jun 26, 2019
Install Plex on Raspbian Stretch for Raspberry Pi 3
View Raspberry Pi Plex Media Server.md
  1. In terminal, upgrade Raspbian.

    sudo apt update && sudo apt dist-upgrade -y
  2. Next, use the raspi-config tool to change some default system settings.

    sudo raspi-config
@Nilpo
Nilpo / psql-with-gzip-cheatsheet.sh
Created Feb 4, 2018 — forked from brock/psql-with-gzip-cheatsheet.sh
Exporting and Importing Postgres Databases using gzip
View psql-with-gzip-cheatsheet.sh
# This is just a cheat sheet:
# On production
sudo -u postgres pg_dump database | gzip -9 > database.sql.gz
# On local
scp -C production:~/database.sql.gz
dropdb database && createdb database
gunzip < database.sql.gz | psql database
@Nilpo
Nilpo / gist:52eda0bf40fddec539aa4ac4bb0ecc2c
Created Sep 9, 2017 — forked from cdown/gist:1163649
Bash urlencode and urldecode
View gist:52eda0bf40fddec539aa4ac4bb0ecc2c
urlencode() {
# urlencode <string>
old_lc_collate=$LC_COLLATE
LC_COLLATE=C
local length="${#1}"
for (( i = 0; i < length; i++ )); do
local c="${1:i:1}"
case $c in
[a-zA-Z0-9.~_-]) printf "$c" ;;
View Ultron 18.py
from line import LineClient, LineGroup, LineContact, LineMessage
import os
import sys
import re
import ast
from curve.ttypes import OperationType, TalkException
try:
# client5 = LineClient("teambarrsackbot5@gmail.com", "321321Ab", authToken="EiLW77LqJc7usR6vB5z9.7x9TsSw19TOlLNYRF2HOUq.sCuQ9zBZ90djqjN0dkBubuPcT2WDi5mG5razGdrcrgI=", com_name="Aero5", is_mac=False)
# client5 = LineClient(os.environ['LINE_ULTRON_LOGIN'], os.environ['LINE_ULTRON_PASS'], com_name="Aero5", is_mac=False)
@Nilpo
Nilpo / flask-logging-on-heroku.py
Last active Jul 9, 2017 — forked from seanbehan/flask-logging-on-heroku.py
logging on heroku with flask
View flask-logging-on-heroku.py
import os
import sys
import logging
from flask import Flask
app = Flask(__name__)
if 'DYNO' in os.environ:
app.logger.addHandler(logging.StreamHandler(sys.stdout))
app.logger.setLevel(logging.ERROR)
@Nilpo
Nilpo / proxy.apache.conf
Created Jun 26, 2017 — forked from chrisjhoughton/proxy.apache.conf
Sample Nginx reverse proxy to Apache set up for Wordpress.
View proxy.apache.conf
<VirtualHost *:{PORT}>
ServerName www.yourdomain.com
ServerAdmin mail@domain.com
DocumentRoot /var/www/yourdir/
<Directory /var/www/yourdir>
Options Indexes FollowSymLinks
AllowOverride all
Order allow,deny
You can’t perform that action at this time.