Skip to content

Instantly share code, notes, and snippets.

View techjacker's full-sized avatar

Andrew Griffiths techjacker

View GitHub Profile

Keybase proof

I hereby claim:

  • I am techjacker on github.
  • I am andrewago (https://keybase.io/andrewago) on keybase.
  • I have a public key ASD-1CZ2iUqyavpYjLcFM6J6yP1eR44CLY5p85qh2WsXawo

To claim this, I am signing this object:

@techjacker
techjacker / .gitignore
Created May 5, 2017 09:28
Gitignore for python + terraform
*.sublime-workspace
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class
# C extensions
*.so
@techjacker
techjacker / .travis.yml
Created May 5, 2017 09:24
Travis config for tests + coverage + linting
language: python
python:
- "3.6"
install:
- make deps
script:
- make lint
@techjacker
techjacker / .pre-commit-config.yaml
Last active April 26, 2017 13:32
Pre commit for Python project
- repo: git://github.com/pre-commit/pre-commit-hooks
sha: 46251c9523506b68419aefdf5ff6ff2fbc4506a4
hooks:
- id: autopep8-wrapper
- id: check-added-large-files
- id: check-case-conflict
- id: check-json
- id: check-merge-conflict
- id: check-yaml
- id: debug-statements
@techjacker
techjacker / aws_ecs_setup.MD
Created November 18, 2015 17:46
Instructions for deploying an ec2 instance based on a docker file using AWS EC2 Container Service using the AWS CLI tool

aws ecs help

echo $AWS_DEFAULT_PROFILE aws configure --profile andrew aws ec2 describe-instance-status --profile andrew --instance-ids i-81c24938

@techjacker
techjacker / nodejsservice.conf
Last active August 29, 2015 14:20
Node.js app init with Upstart
# /etc/init/nodejsservice.conf
description "Node Restart Script: Using Upstart"
author "Andrew Griffiths"
start on (local-filesystems and net-device-up IFACE=eth0)
stop on shutdown
setuid www-data
setgid www-data
@techjacker
techjacker / prepare-commit-msg
Last active March 18, 2016 14:56
Prepend feature branch name to commit message
#!/bin/bash
#################################################################
#
# prepend feature branch name to the commit message
# eg feature/MT-3453 -> 'MT-3453 my brilliant new feature'
#
# 1. save to .git/hooks/prepare-commit-msg
# 2. chmod +x .git/hooks/prepare-commit-msg
#
@techjacker
techjacker / phantom-component.js
Last active December 21, 2015 05:39
phantomjs cannot load component.js apps
var page = require('webpage').create();
// search div is added after ajax call has been made
// but with phantom driving the ajax call never runs
var waitForAjaxToLoad = function () {
return (document.getElementById('search') != null);
};
page.open('http://component.io/', function (status) {
@techjacker
techjacker / gruntfile.js
Created October 14, 2012 20:34
my gruntfile.js
/*global module:false*/
module.exports = function(grunt) {
var SRC_DIR = 'src/';
var SRC_CSS = SRC_DIR + 'css/';
var SRC_JS = SRC_DIR + 'js/';
var SRC_IMG = SRC_DIR + 'images/';
var BUILD_DIR = 'public/';