Skip to content

Instantly share code, notes, and snippets.

View keybase.md

Keybase proof

I hereby claim:

  • I am shanestillwell on github.
  • I am shanestillwell (https://keybase.io/shanestillwell) on keybase.
  • I have a public key ASDtLGEBWJK61erLkJy7cWH2kuBTDOoAiM2IBrxOf9Gsago

To claim this, I am signing this object:

@shanestillwell
shanestillwell / Dockerfile
Created Jan 9, 2018 — forked from yefim/Dockerfile
Build a Docker image, push it to AWS EC2 Container Registry, then deploy it to AWS Elastic Beanstalk
View Dockerfile
# Example Dockerfile
FROM hello-world
@shanestillwell
shanestillwell / publish.sh
Created Jul 27, 2016
Publish my git/docker code
View publish.sh
#!/bin/bash
IMAGE_NAME=registry.gitlab.com/shanestillwell/goscouter-api;
CURR_COMMIT=$(git rev-parse HEAD);
CURR_VERSION=$(node -e "console.log(require('./package.json').version);");
VER_HASH=$(git rev-list -n 1 v$CURR_VERSION);
# Don't want to redo version bump
if [ $CURR_COMMIT == $VER_HASH ]
then
View docker-compose.prod.yaml
version: '2'
services:
nginx:
image: registry.gitlab.com/shanestillwell/goscouter-nginx:latest
restart: unless-stopped
ports:
- 443:443
volumes:
- /root/ssl:/etc/nginx/ssl
View clean-up-docker.sh
#!/bin/bash
docker volume rm $(docker volume ls -q -f dangling=true);
docker rmi $(docker images -f "dangling=true" -q)
View gist:65a2e5d5f5daf8bf7be2
#!/bin/bash
#
# Argument = -u user -p password -k key -s secret -b bucket
#
# To Do - Add logging of output.
# To Do - Abstract bucket region to options
set -e
export PATH="$PATH:/usr/local/bin"
View gist:11297429
var express = require('express'),
http = require('http'),
longRes = require('./data'),
app = express();
app.disable('x-powered-by');
// this is the function utilized to stage a request
express.response.stage = function(body, cb) {
this.stagedResponse = {body: body}
View gist:8865981
var uiRouter = require('./common/angular-ui-router'),
common = require('./common/common'),
home = require('./home'),
signup = require('./account');
angular.module('sw', [
'sw.home',
'sw.signup',
'ui.router',
'sw.common'
View chessboard.js
var input = "BMC_TEST_INPUT_MAGIC"
input = input.split(',');
var evenRow = "";
var oddRow = "";
var board = "";
// gen columns
for(i = 0; input[0] > i; i++){
if(i % 2 == 1){
@shanestillwell
shanestillwell / jstest.js
Created Oct 10, 2013
Tell me what's wrong with this code?
View jstest.js
var userService = (function() {
// This array will store all users
var userList = [
{
id: 1,
name: 'First User',
email: 'first.user@example.com'
}
];
You can’t perform that action at this time.