Skip to content

Instantly share code, notes, and snippets.

@kimh
kimh / config.yml
Created February 23, 2019 07:04
ECR/ECSへCircleCI Orbsを使ってデプロイするサンプル
version: 2.1
orbs:
aws-ecr: circleci/aws-ecr@1.0.0 # ECRのOrbをインポート
aws-ecs: circleci/aws-ecs@0.0.6 # ECSのOrbをインポート
workflows:
build-and-deploy:
jobs:
- aws-ecr/build_and_push_image: # 用意されているジョブにパラメータを渡して呼ぶ
account-url: AWS_ECR_ACCOUNT_URL # ECRのアカウントの環境変数
repo: 'nginx' # イメージのレポジトリ
@kimh
kimh / Screen Shot 2019-01-24 at 10.40.07.png
Last active January 24, 2019 01:42
Plan transfer screenshot
Screen Shot 2019-01-24 at 10.40.07.png
@kimh
kimh / clone_test.go
Last active November 16, 2018 00:19
Demonstrate go-git race
package clone
import (
"os"
"golang.org/x/crypto/ssh"
"gopkg.in/src-d/go-git.v4"
gitssh "gopkg.in/src-d/go-git.v4/plumbing/transport/ssh"
"io/ioutil"
"testing"

malloc.c

#include <stdio.h>
#include <stdlib.h>

int main (void) {
        int n = 0;

 while (1) {
@kimh
kimh / spacemacs-cheetsheet.md
Last active December 8, 2017 04:35
spacemacs-cheetsheet.md

Open .spacemacs

SPC f e d

Fix unbalanced paren

C-q ;; insert

;; I don't know how to delete unbalanced paren

C-M-b paredit-backward

Clojure stuff

(require 'circle-vault.core :reload)
(use 'circle-vault.core :reload)
(in-ns 'circle-vault.core)
(use 'clojure.pprint)

(def role-id "ec355569-a8a4-1688-a375-06d059789a9b")
(def secret-id "7c54fab1-7e00-aecf-6330-79589caaff1d")
@kimh
kimh / gist:9d20014a4f989b079e5964462a590c67
Created November 25, 2016 08:19
docker api response: pull image
{"status":"latest: Pulling from library/busybox"}
{"status":"56bec22e3559: Already exists"}
{"status":"Digest: sha256:29f5d56d12684887bdfa50dcd29fc31eea4aaf4ad3bec43daf19026a7ce69912"}
{"status":"Status: Downloaded newer image for busybox:latest"}
@kimh
kimh / gist:e05029577b4f37b35a245a6b3a60763e
Created November 25, 2016 08:18
docker api response: create containers
{
"Id":"e90e34656806",
"Warnings":[]
}
@kimh
kimh / gist:f0f3f56a0168f57795da250b869e8555
Created November 25, 2016 08:17
docker api response: list containers
[
{
"Id": "8dfafdbc3a40",
"Names":["/boring_feynman"],
"Image": "ubuntu:latest",
"ImageID": "d74508fb6632491cea586a1fd7d748dfc5274cd6fdfedee309ecdcbc2bf5cb82",
"Command": "echo 1",
"Created": 1367854155,
"State": "Exited",
"Status": "Exit 0",
package mytest
import (
"errors"
"fmt"
"net/http"
"io"
"io/ioutil"
"testing"
"context"