Skip to content

Instantly share code, notes, and snippets.

### Keybase proof
I hereby claim:
* I am shanestillwell on github.
* I am northernv (https://keybase.io/northernv) on keybase.
* I have a public key ASCI7x0nYCqJz0f9S6KPpCk23iPMItWwooRg6Le2gKn_VQo
To claim this, I am signing this object:
@shanestillwell
shanestillwell / gateway-health-check-schema-only.js
Created March 4, 2021 18:26 — forked from abernix/gateway-health-check-schema-only.js
Apollo Gateway: Health Check: Schema Only
import { ApolloGateway } from "@apollo/gateway";
import { ApolloServer, gql } from "apollo-server-express";
const gateway = new ApolloGateway({ /* Options, maybe! */ });
const server = new ApolloServer({
subscriptions: false,
typeDefs: gql`
type Query {
book: String
}
@shanestillwell
shanestillwell / Dockerfile
Created January 9, 2018 21:12 — forked from yefim/Dockerrun.aws.json
Build a Docker image, push it to AWS EC2 Container Registry, then deploy it to AWS Elastic Beanstalk
# Example Dockerfile
FROM hello-world
@shanestillwell
shanestillwell / publish.sh
Created July 27, 2016 19:16
Publish my git/docker code
#!/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
version: '2'
services:
nginx:
image: registry.gitlab.com/shanestillwell/goscouter-nginx:latest
restart: unless-stopped
ports:
- 443:443
volumes:
- /root/ssl:/etc/nginx/ssl
#!/bin/bash
docker volume rm $(docker volume ls -q -f dangling=true);
docker rmi $(docker images -f "dangling=true" -q)
#!/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"
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}
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'
@shanestillwell
shanestillwell / chessboard.js
Last active December 27, 2015 15:19
Code Challenges
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){