Skip to content

Instantly share code, notes, and snippets.

View brianjking's full-sized avatar
💭
Doin' cool stuff at BrandMuscle AI

Brian J King brianjking

💭
Doin' cool stuff at BrandMuscle AI
View GitHub Profile
@brianjking
brianjking / index.js
Created March 11, 2016 17:32 — forked from MoOx/index.js
Export/import github labels
// go on you labels pages
// eg https://github.com/cssnext/cssnext/labels
// paste this script in your console
// copy the output and now you can import it using https://github.com/popomore/github-labels !
var labels = [];
[].slice.call(document.querySelectorAll(".label-link"))
.forEach(function(element) {
labels.push({
name: element.textContent.trim(),
@brianjking
brianjking / speedtest-ifttt.sh
Created March 8, 2016 22:37 — forked from aallan/speedtest-ifttt.sh
Modified version of Henrik Bengtsson's speedtest-cli code which will dispatch the test results to the IFTTT Maker Channel.
#!/usr/bin/env bash
###########################################################################
# Originally written by: Henrik Bengtsson, 2014
# https://github.com/HenrikBengtsson/speedtest-cli-extras
# Modified to use IFTTT by: Alasdair Allan, 2015
# License: GPL (>= 2.1) [http://www.gnu.org/licenses/gpl.html]
###########################################################################
# Character for separating values
# (commas are not safe, because some servers return speeds with commas)
@brianjking
brianjking / statement-of-work.md
Created February 23, 2016 22:11
An example of my statement of work signed with clients as of April 29, 2015.

Statement of Work

Between us [the Maker] and you [Client]

SUMMARY:

You [Client], located at [address] are hiring us [The Maker] located at [The Maker's addy] to [create something unique and awesome] for the estimated total price of [$XX.XX].

What do both parties agree to do?

You: Possess the authority to enter into this contract on behalf of yourself, your company or your organization. You’ll give us everything we need to complete the project as and when and in the format we need it. You’ll review our work, provide feedback and approval in a timely manner too. Deadlines work two ways, so you’ll also be bound by dates we set together. You also agree to stick to the payment schedule set out at the end of this contract.

#!/usr/bin/env ruby1.9.3
require 'pg'
require 'optparse'
require 'tmpdir'
require 'shellwords'
require 'socket'
require 'json'
require 'digest'
require 'public_suffix'
@brianjking
brianjking / about-rpi.md
Created February 19, 2016 00:25 — forked from arpanpal010/about-rpi.md
Raspberry Pi configurations

##Configurations for Raspberry Pi Home Server## #####Using Raspbian##### (although the procedures are similar/compatible with most debian based systems.)

###Added###

  • [sysctl.conf mods] (#file-sysctl-md)
  • [Firewall config] (#file-firewall-md)
  • [DNS Server] (#file-dns-md)
  • [Dynamic Dns] (#file-dyndns-md)
  • [Git Server] (#file-git-server-md)
@brianjking
brianjking / rpi_setup.md
Created February 19, 2016 00:24 — forked from dphiffer/rpi_setup.md
Raspberry Pi setup
@brianjking
brianjking / nginx_reverse_proxy.conf
Created February 19, 2016 00:20 — forked from rafaelfoster/nginx_reverse_proxy.conf
Reverse Proxy with Nginx
upstream targetwebservice {
server host2.example.com:8000 weight=1 fail_timeout=300s;
}
#server {
# listen 8081;
# server_name servername.exameple.com;
# add_header Strict-Transport-Security max-age=2592000;
# rewrite ^/.*$ https://servername.exameple.com/ permanent;
#}
server {
@brianjking
brianjking / URLs
Created February 19, 2016 00:20 — forked from strebl/URLs
Server, Admin Panels, Web
http://redd.it/1xizt0 Gentoo?
strebl.ch/21ai Ajenti
strebl.ch/1u0w Vesta Control Panel
strebl.ch/to6 cPanel
strebl.ch/1usg Choosing control panel management
strebl.ch/qrr ServerPilot
strebl.ch/1dz6 ServerPilot Experience
strebl.ch/ntg PuPHPet - A simple GUI to set up virtual machines for Web development.
strebl.ch/1ucq Phansible provides an easy-to-use interface to generate Ansible provisionings.
@brianjking
brianjking / ajenti.conf
Created February 19, 2016 00:18 — forked from wieshka/ajenti.conf
Working NGINX configuration for Ajenti reverse proxy
server {
listen *:443 ssl;
listen *:80;
ssl_certificate /etc/self-signed-ssl/cert.crt;
ssl_certificate_key /etc/self-signed-ssl/cert.key;
server_name FQDN;
access_log /var/log/nginx/ajenti-web-panel.access.log;
error_log /var/log/nginx/ajenti-web-panel.error.log;
@brianjking
brianjking / letsencrypt_with_autorenewal.md
Created February 19, 2016 00:18
Letsencrypt with automatic renewal
  • use Ubuntu 14.04 (check with lsb_release -a)
  • set up VPS like this
  • set up Nginx - (tutorial) - if you use Digital ocean, there are also many preconfigured images available that already have Nginx configured, e.g., I used the Django+PostgreSQL image, which has Nginx configured as reverse proxy in front of Gunicorn
  • further setup (optional, I actually didn't do this)
  • lets encrypt setup
  • make backup of /etc/letsencrypt
  • the current certificate, private key etc then are in /etc/letsencrypt/live/your_domain_name
  • for auto renewal: when using Nginx as a reverse proxy, i.e. when you do not have a tradition