Skip to content

Instantly share code, notes, and snippets.

View yeongsheng-tan's full-sized avatar

Tan Yeong Sheng yeongsheng-tan

View GitHub Profile
@yeongsheng-tan
yeongsheng-tan / # vapor - 2018-04-09_12-52-29.txt
Created April 9, 2018 05:00
vapor (vapor/tap/vapor) on macOS 10.13.4 - Homebrew build logs
Homebrew build logs for vapor/tap/vapor on macOS 10.13.4
Build date: 2018-04-09 12:52:29
@yeongsheng-tan
yeongsheng-tan / gist:36788661462747f37dd10d107a4c85cd
Created November 3, 2017 02:18
Onename Github account verification
Verifying that "yeongsheng.id" is my Blockstack ID. https://onename.com/yeongsheng
Verifying my Blockstack ID is secured with the address 1GLpsxSJa6GV4ypMY8MNysgywUZ9wBZD99 https://explorer.blockstack.org/address/1GLpsxSJa6GV4ypMY8MNysgywUZ9wBZD99
@yeongsheng-tan
yeongsheng-tan / release_tasks.ex
Created May 23, 2017 23:44
Example custom MFA for migration task
defmodule MyApp.ReleaseTasks do
@app :my_app
@start_apps [:postgrex, :ecto]
def migrate do
pre_start()
Enum.each([@app], &run_migrations_for/1)
post_start()
end
@yeongsheng-tan
yeongsheng-tan / my_db_migrate.sh
Last active May 23, 2017 23:38
Sample DB migration script that uses `bin/<release_name> command <my_mix_MFA_task>`
#!/usr/bin/env sh
# File is located in my_app/priv/commands/my_db_migrate.sh
echo "In script"
echo $SCRIPT
"${SCRIPT}" command Elixir.MyApp.ReleaseTasks migrate
@yeongsheng-tan
yeongsheng-tan / config.exs
Last active May 23, 2017 23:26
Distillery release migration commands
# distillery rel/config.exs sample content for linking up migration tasks
Path.join(["rel", "plugins", "*.exs"])
|> Path.wildcard()
|> Enum.map(&Code.eval_file(&1))
use Mix.Releases.Config,
# This sets the default release built by `mix release`
default_release: :my_app,
# This sets the default environment used by `mix release`
default_environment: Mix.env()
@yeongsheng-tan
yeongsheng-tan / devops_coding_challenge.md
Created February 11, 2017 06:37 — forked from cecepm/devops_coding_challenge.md
Devops Coding Challenge - get an app set up and running

Devops Coding Challenge

Get this app up and running on a Vagrant VM using your known production best practices as well as the instructions in the guidelines below.

You should use provisioner to install and configure everything. Ansible is preffered. But you can use chef or puppet if you more familiar with those tools. (please don't use shell provisioner).

Keybase proof

I hereby claim:

  • I am yeongsheng-tan on github.
  • I am yeongsheng_tan (https://keybase.io/yeongsheng_tan) on keybase.
  • I have a public key ASC3je2qcCaHAA_10-6ctjC3RIg-sM_nQuS7pGmHvudV9go

To claim this, I am signing this object: