Skip to content

Instantly share code, notes, and snippets.

View philipnrmn's full-sized avatar
verified account

Philip Norman philipnrmn

verified account
View GitHub Profile
@philipnrmn
philipnrmn / marathon.json
Created January 12, 2017 00:36
A sample nginx-on-marathon config which serves HTTP and HTTPS
{
"id": "/philip/mesos-https",
"instances": 1,
"cpus": 0.1,
"mem": 128,
"disk": 0,
"gpus": 0,
"fetch": [
{
"uri": "https://gist.githubusercontent.com/philipnrmn/1c37364baf3157f51567401c51373f5c/raw/00f435020499104b06f06fdf6caed4b435b0acf8/default.conf",
@philipnrmn
philipnrmn / default.conf
Created January 12, 2017 00:06
Dockerhub Nginx SSL default.conf
server {
listen 80;
listen 443 ssl;
server_name localhost;
ssl_certificate /etc/nginx/ssl/nginx.crt;
ssl_certificate_key /etc/nginx/ssl/nginx.key;
#charset koi8-r;
#access_log /var/log/nginx/log/host.access.log main;
@philipnrmn
philipnrmn / keybase.md
Created April 19, 2016 14:19
Keybase Proof

Keybase proof

I hereby claim:

  • I am philipnrmn on github.
  • I am philipnrmn (https://keybase.io/philipnrmn) on keybase.
  • I have a public key ASDiSTp2dK4h1OVB0iMrLwQgCKWWQ-0_tYJn-PcrqBeCDwo

To claim this, I am signing this object:

@philipnrmn
philipnrmn / malinger.py
Last active December 14, 2015 11:01
Fails marathon healthchecks predictably
#!/usr/local/bin/python3
# -*- coding: utf-8 -*-
from flask import Flask, redirect, url_for
from os import environ
'''
Usage:
$ pip3 install flask
$ PORT=8001 python3 malinger.py
@philipnrmn
philipnrmn / jquery.jerky.js
Created August 20, 2013 15:34
Jerky easing in jQuery
(function($) {
// The bigger the step, the jerkier the animation
var step = 0.11,
lastStep = 0;
$.easing.jerky = function(t) {
if (t < step)
lastStep = 0;
if (t > lastStep + step)
lastStep += step;