Skip to content

Instantly share code, notes, and snippets.

View masutaka's full-sized avatar

Takashi Masuda masutaka

View GitHub Profile
@masutaka
masutaka / git-push.log
Created April 26, 2019 15:12
Heroku Buildpack research
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Node.js app detected
remote:
remote: -----> Creating runtime environment
remote:
remote: NPM_CONFIG_LOGLEVEL=error
remote: NODE_ENV=production
remote: NODE_MODULES_CACHE=true
# For issues
workflow "issues" {
on = "issues"
resolves = ["Add an issue to project"]
}
action "Add an issue to project" {
uses = "docker://masutaka/github-actions-all-in-one-project"
secrets = ["GITHUB_TOKEN"]
@masutaka
masutaka / 00Overview
Created February 1, 2019 06:43
All in one GitHub Project using GitHub Actions
.github
├── main.workflow (01main.workflow)
└── project
├── Dockerfile
└── entrypoint.sh
@masutaka
masutaka / 00Overview
Last active January 27, 2019 13:52
A sample files of GitHub Actions
.github
├── hadolint
│ ├── Dockerfile (hadolint_Dockerfile)
│   └── entrypoint.sh (hadolint_entrypoint.sh)
├── main.workflow (01main.workflow)
└── shellcheck
├── Dockerfile (shellcheck_Dockerfile)
└── entrypoint.sh (shellcheck_entrypoint.sh)
@masutaka
masutaka / app.json
Last active January 27, 2019 13:04
A sample files of Heroku CI
{
"environments": {
"test": {
"scripts": {
"test-setup": "./script/test-setup",
"test": "./script/test"
}
}
}
}
@masutaka
masutaka / heroku.tf
Last active January 19, 2019 16:11
How to get a pushover notification when your Heroku app is deployed
resource "heroku_app" "main" {
name = "masutaka-net"
region = "us"
stack = "container"
}
resource "heroku_formation" "web" {
app = "${heroku_app.main.name}"
type = "web"
quantity = 1
@masutaka
masutaka / Dockerfile
Created January 19, 2019 07:02
masutaka.net on Heroku Docker
# (1) Perl の chalow コマンドで CHANGELOG メモを静的ファイルに変換
FROM perl:5.28.0 AS chalow
RUN cpanm CGI HTML::Template
WORKDIR /work
COPY chalow/ chalow
COPY script/ script
COPY webroot/ webroot
RUN ./script/mkchalow
# (2) Honoka の css を取得
@masutaka
masutaka / deploy.log
Last active December 20, 2018 13:26
Heroku deployment log using heroku.yml with ruby buildpack
=== Fetching app code
=== Building heroku (Dockerfile)
2018/12/20 12:47:33 need environment variables HEROKU_REGISTRY_HOST and HEROKU_API_TOKEN
Sending build context to Docker daemon 141.8kBStep 1/14 : FROM heroku/heroku:18-build as build
18-build: Pulling from heroku/heroku
32802c0cfa4d: Pulling fs layer
da1315cffa03: Pulling fs layer
fa83472a3562: Pulling fs layer
f85999a86bef: Pulling fs layer
305b24214bff: Pulling fs layer
@masutaka
masutaka / console.txt
Created November 12, 2018 13:19
/usr/include hides deep inside from macOS Mojave
$ gcc -v test.c
Apple LLVM version 10.0.0 (clang-1000.10.44.4)
Target: x86_64-apple-darwin18.2.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
"/Library/Developer/CommandLineTools/usr/bin/clang" -cc1 -triple x86_64-apple-macosx10.14.0 -Wdeprecated-objc-isa-usage -Werror=deprecated-objc-isa-usage -emit-obj -mrelax-all -disable-free -disable-llvm-verifier -discard-value-names -main-file-name test.c -mrelocation-model pic -pic-level 2 -mthread-model posix -mdisable-fp-elim -fno-strict-return -masm-verbose -munwind-tables -target-cpu penryn -dwarf-column-info -debugger-tuning=lldb -target-linker-version 409.12 -v -resource-dir /Library/Developer/CommandLineTools/usr/lib/clang/10.0.0 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk -I/usr/local/include -fdebug-compilation-dir /Users/masutaka/Dropbox/test/c -ferror-limit 19 -fmessage-length 165 -stack-protector 1 -fblocks -fencode-extended-block-signature -fobjc-runtime=macosx-10.14.0 -fmax-type-align=16 -fdiagnost
@masutaka
masutaka / 0_zsh_setup.zsh
Created October 28, 2018 13:08
Heroku CLI autocomplete research
# /Users/masutaka/Library/Caches/heroku/autocomplete/zsh_setup
expand-or-complete-with-dots() {
echo -n "..."
zle expand-or-complete
zle redisplay
}
zle -N expand-or-complete-with-dots
bindkey "^I" expand-or-complete-with-dots
HEROKU_AC_ANALYTICS_DIR=/Users/masutaka/Library/Caches/heroku/autocomplete/completion_analytics;