Skip to content

Instantly share code, notes, and snippets.

View jaigouk's full-sized avatar

Jaigouk Kim jaigouk

View GitHub Profile
@jaigouk
jaigouk / keybase.md
Created October 28, 2016 09:32
keybase.md

Keybase proof

I hereby claim:

  • I am jaigouk on github.
  • I am jaigouk (https://keybase.io/jaigouk) on keybase.
  • I have a public key whose fingerprint is F1E5 9314 6FA5 2837 6C49 026B FD8F 6CD7 F1A1 611F

To claim this, I am signing this object:

Elastic Load Balancer, CloudFront and Let's Encrypt
@jaigouk
jaigouk / .eslintrc
Created August 29, 2016 16:30
lint rc
{
parser: "babel-eslint",
env: {
es6: true,
browser: true
},
parserOptions: {
ecmaVersion: 6,
sourceType: "module",
ecmaFeatures: {
@jaigouk
jaigouk / Gemfile
Created July 27, 2016 18:29
flatten
source 'https://rubygems.org'
group :development do
gem 'guard'
gem 'pry'
gem "minitest"
gem 'guard-minitest'
end
# Your init script
#
# Atom will evaluate this file each time a new window is opened. It is run
# after packages are loaded/activated and after the previous editor state
# has been restored.
#
# An example hack to log to the console when each text editor is saved.
#
# atom.workspace.observeTextEditors (editor) ->
# editor.onDidSave ->
@jaigouk
jaigouk / Dockerfile
Created October 9, 2015 03:56 — forked from thom-nic/Dockerfile
Dockerfile that attempts to run the app as non-root user. This creates a `node` user & sets permissions on app files. Note you cannot `chown` files in a docker 'volume' during the build process, but you can at runtime (as part of your `CMD`) but in that case you can't use the `USER` command to change the UID before `CMD` runs.
###
# Node.js app Docker file
#
# Some basic build instructions:
# ```
# # you should delete node_modules b/c you don't want that copied during 'ADD'
# docker build -t thom-nic/node-bootstrap .
# # run a shell in the container to inspect the environment (as root):
# docker run --rm -itu root thom-nic/node-bootstrap /bin/bash
# ```
@jaigouk
jaigouk / api.md
Created July 15, 2015 14:30
olleh

coord options for requesting

  • Geographic (COORDTYPE = 0)
  • TM WEST (COORDTYPE = 1)
  • TM MID (COORDTYPE = 2)
  • TM EAST (COORDTYPE = 3)
  • KATEC (COORDTYPE = 4)
  • UTM52 (COORDTYPE = 5)
  • UTM51 (COORDTYPE = 6)
  • UTMK (COORDTYPE = 7)
[Unit]
Description=App Redis Sidekick
Requires=docker.service
Requires=etcd.service
After=docker.service
After=etcd.service
After=app-redis.service
BindsTo=app-redis.service
prepare_server(){
do_droplets=(xx.xx.xx.xx xx.xx.xx.xx xx.xx.xx.xx)
for server in ${do_servers[@]}
do
ssh -A user_1@$server 'rm -rf /home/user_1/project/my_key_file'
scp /Users/hello_there/path_to/certs/key.pem user_1@$server:project/my_key_file
ssh -A user_1@$server 'chown -R user_1:user_1 /home/user_1/project; \
chmod 700 /home/user_1/project; \
chmod 600 /home/user_1/project/authorized_keys'
done

#Nginx Load Balancer Service For Core OS

Create a directory to manage using fleetctl for this service:

$ mkdir static

Create this file in static/nginx_lb.service