Skip to content

Instantly share code, notes, and snippets.

@gkrizek
gkrizek / notes-file.sh
Created December 4, 2015 05:34
Notepad for Today Scripts (from file)
cat /Users/AppleUser/location/of/file
@gkrizek
gkrizek / notes-nofile.sh
Created December 4, 2015 05:37
Notepad for Today Scripts (without file)
echo "Milk,
Bread,
Eggs"
@gkrizek
gkrizek / public-ip.sh
Created March 27, 2016 04:56
Public IP query for Today Scripts
curl -s checkip.dyndns.org | sed -e 's/.*Current IP Address: //' -e 's/<.*$//'
@gkrizek
gkrizek / meteor-nginx.conf
Created June 27, 2016 01:14
NGINX configuration for a Meteor application. See: https://blog.gitrandom.com
server_tokens off;
map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}
server {
listen 80 default_server;
server_name example.com;
@gkrizek
gkrizek / cloudflare
Created June 27, 2016 01:23
NGINX configuration to get real IP of visitor if site is behind Cloudflare
set_real_ip_from 199.27.128.0/21;
set_real_ip_from 173.245.48.0/20;
set_real_ip_from 103.21.244.0/22;
set_real_ip_from 103.22.200.0/22;
set_real_ip_from 103.31.4.0/22;
set_real_ip_from 141.101.64.0/18;
set_real_ip_from 108.162.192.0/18;
set_real_ip_from 190.93.240.0/20;
set_real_ip_from 188.114.96.0/20;
set_real_ip_from 197.234.240.0/22;
@gkrizek
gkrizek / meteor-init-script
Created June 27, 2016 01:24
Init script for a Meteor application. See: https://blog.gitrandom.com
#!/bin/bash
#
# Service script for running a bundled Meteor application under Forever.
#
. /etc/init.d/functions
NAME=APPNAME
SOURCE_DIR=/var/www/APPNAME
SOURCE_FILE=main.js
@gkrizek
gkrizek / meteor-deploy-client.sh
Created June 27, 2016 01:39
Script to deploy a Meteor application. Requires the Server side script as well. See: https://blog.gitrandom.com
#!/bin/bash
###
# Script to Deploy Meteor App to server
# This has a counterpart on the server, which is called at the end of this script
###
# create by Graham Krizek on March 28, 2016
###
#
echo "Are you deploying to production or staging?"
#!/bin/bash
###
# Script to Deploy Meteor App to server
# This has a counterpart on the client, which is what calls this script to run
# If you need help with the Cloudflare API, check their docs
###
# create by Graham Krizek on March 28, 2016
###
#
APP_NAME="APPNAME"
@gkrizek
gkrizek / meteor-deploy-server.sh
Created June 27, 2016 01:43
Script to deploy a Meteor application. Requires the Client side script as well. See: https://blog.gitrandom.com
#!/bin/bash
###
# Script to Deploy Meteor App to server
# This has a counterpart on the client, which is what calls this script to run
# If you need help with the Cloudflare API, check their docs
###
# create by Graham Krizek on March 28, 2016
###
#
APP_NAME="APPNAME"

Keybase proof

I hereby claim:

  • I am gkrizek on github.
  • I am gkrizek (https://keybase.io/gkrizek) on keybase.
  • I have a public key ASDUkFNWxpP0z6EOwGG4Jt-Az3TsEFcivFZqAY8tjxZ2tAo

To claim this, I am signing this object: