View Echo.elm
port module Echo exposing (..)
import Platform exposing (program, Program)
import Json.Decode
-- importing Json.Decode is necessary for now because of https://github.com/elm-lang/elm-make/issues/127
---- MODEL ----
type alias Model =
{ crap : String }
View install-docker-ce-on-loki.sh
#!/usr/bin/env bash
# based on https://store.docker.com/editions/community/docker-ce-server-ubuntu
sudo apt-get -y install apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu xenial stable"
sudo apt update
sudo apt-get install -y docker-ce
sudo usermod -aG docker $USER
View 0-papercliper-fog-gcs.md

An example code to use GCS instead of S3

View env-strip.sh
#!/usr/bin/env bash
## strip newlines of envs
# used some code from http://stackoverflow.com/a/11746174
string=`printenv`
arr=()
while read -r line; do
arr+=("$line")
View encode-env-via-base64.rb
#!/usr/bin/env ruby
filename = ARGV.first
file = File.new(filename, "r")
while (line = file.gets)
k, v = line.split('=', 2)
ev = `echo "#{v}" | base64`.gsub("\n",'')
puts " #{k}: #{ev}"
end
file.close
View autoUnmountify.js
var flag = 0;
autoUnmountify = (ele) => {
const wrap = <span>{ele}</span>;
const unmountify = flag ? wrap : ele;
flag = !flag;
return unmountify;
}
View 0_reuse_code.js
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
View PhotoResource.m
//
// PhotoResource.h
// Modeling
//
// Created by Heechul on 1/8/16.
// Copyright © 2016 Heechul Ryu. All rights reserved.
//
#import <UIKit/UIKit.h>
View NSString+Ranges.m
//
// NSString+Ranges.h
// Modeling
//
// Created by Heechul Ryu on 12/11/15.
// Copyright © 2015 Heechul Ryu. All rights reserved.
//
#import <Foundation/Foundation.h>
View UIScrollView+AdjustOffset.m
@interface UIScrollView (AdjustOffset)
- (CGFloat)updateContentOffsetWithPreviousHeight:(CGFloat)previousHeight distanceFromBottom:(CGFloat)distanceFromBottom;
@end
@implementation UIScrollView (AdjustOffset)
- (void)updateContentOffset:(CGPoint)offset
{