Skip to content

Instantly share code, notes, and snippets.

View drewgates's full-sized avatar

Drew Gates drewgates

View GitHub Profile
#The below script/code is provided without warranty.
#Only use if you clearly understand what you are doing, and accept all risk.
#This advise applies to ALL script/code you find on the internet.
#Tested on Powershell 5.0 on Windows 10.
#
#---------ADD YOUR INFORMATION HERE-------
#HTTP webhook signing key, Found in the settings page of your mailgun account. Keep this secure. Do not save it with this script.
#https://app.mailgun.com/app/account/security/api_keys
$mailgunAPIkey = "key-000000000000000000"
#Senders Domain Name
server {
server_name DOMAIN;
location / {
proxy_pass http://localhost:3000;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
@drewgates
drewgates / index.html
Created February 24, 2020 15:06
VwLPbpG
<section class="accordion-section clearfix mt-3" aria-label="Question Accordions">
<div class="container">
<h2>Frequently Asked Questions </h2>
<div class="panel-group" id="accordion" role="tablist" aria-multiselectable="true">
<div class="panel panel-default">
<div class="panel-heading p-3 mb-3" role="tab" id="heading2">
<h3 class="panel-title">
@drewgates
drewgates / hartford_county_count.txt
Created March 6, 2019 19:37
Google Sheets formula to count cells if the city/town is in Hartford County, CT
=ArrayFormula(SUM(COUNTIF(G2:G70,{"Addison", "Alsop Corner", "Avon", "Avon Park North", "Avon Park South", "Bahre Corner", "Bell Air", "Bellin Terrace", "Bensted Corner", "Berlin", "Birchwood", "Bishop's Corner", "Bloomfield", "Blue Hills", "Brainerd Park", "Breakneck", "Bristol", "Broad Acres", "Broad Brook", "Brookhaven Village", "Buckingham", "Buckland", "Bull Run Corner", "Burlington", "Burnham", "Burnside", "Canton", "Canton Center", "Canton Valley", "Carroll Corners", "Case Corner", "Chatsworth Village", "Cherry Park", "Children's Village of the Hartford Orphan Asylum", "Coachlight Village", "Collinsville", "Colonial Mobile Home Park", "Corbin Heights Housing", "Cottage Farms", "Cottage Grove", "Cotton Hollow", "Crowleys Corner", "Dutch Point Colony", "East Berlin", "East Bristol", "East Farmington Heights", "East Glastonbury", "East Granby", "East Hartford", "East Hartford Gardens", "East Hartland", "East Plymouth", "East Side", "East Windsor Hill", "Ebbs Corner", "Edgewood", "Elm Hill", "Elmwood", "El
Jackbox Games with Max Player Counts
Fibbage
- Fibbage (2-8 players)
The Jackbox Party Pack
- You Don't Know Jack 2015 (1-4 players)
- Fibbage XL (2-8 players)
- Drawful (3-8 players)
- Word Spud (2-8 players)
- Lie Swatter (1-100 players)
@drewgates
drewgates / nginx-reverseproxy-example.com.conf
Last active January 3, 2019 21:20
sample nginx config for reverse proxy
# replace all instances of example.com with your domain name.
# request the appropriate Letsencrypt SSL Cert and fix the cert paths appropriately.
# paste this in /etc/nginx/sites-available/ as "example.com.conf" (replace with your domain) and then symlink to /etc/nginx/sites-enabled/
# nginx -t and systemctl nginx reload.
# Replace target.example.com with the appropriate IP or target domain in the proxy_pass line.
# Good luck!
server {
server_name example.com;
@drewgates
drewgates / PHP Password Protect Website
Last active August 1, 2018 21:04 — forked from jayde/PHP Password Protect Website
PHP Simple Page Authentication / Password Protect
<?
header("Content-type: text/html; charset=utf-8");
if(empty($_SERVER['PHP_AUTH_USER'])) {
header('WWW-Authenticate: Basic realm=""');
header('HTTP/1.0 401 Unauthorized');
echo 'Password Required';
exit;
} else {
$password = "password";
if(
@drewgates
drewgates / blinkLed.py
Last active March 18, 2018 20:42 — forked from elktros/blinkLed.py
How to Blink an LED with Raspberry Pi
#!/usr/bin/env python
import RPi.GPIO as GPIO # RPi.GPIO can be referred as GPIO from now
import time
ledPin = 17 # pin17
def setup():
GPIO.setmode(GPIO.BCM) # Use BCM Pin Numbering to match T-Cobbler Numbering
GPIO.setup(ledPin, GPIO.OUT) # Set ledPin as output
GPIO.output(ledPin, GPIO.LOW) # Set ledPin to LOW to turn Off the LED

Apache Config Files, by default, are stored in /etc/apache2/sites-available, and the naming convention for the vhost configuration files is 'example.com.conf'

Before creating a vhost, add a webroot directory for that host (mkdir /var/www/example.com/)

Create a config file for the vhost, and paste in the config below. If you are not using SSL, use the top section only.

edit as necessary to use your domain name/folder name.

<VirtualHost *:80> ServerName drew.ga ServerAlias www.drew.ga

@drewgates
drewgates / reserved_words.txt
Created March 7, 2017 19:12
Proposed list of reserved usernames/emails for spark.coop
about
abuse
access
account
accounts
activate
add
address
adm
admin