Skip to content

Instantly share code, notes, and snippets.

View SpringMT's full-sized avatar

Spring_MT SpringMT

View GitHub Profile
% ruby -v ~/study/ruby
ruby 2.5.1p57 (2018-03-29 revision 63029) [x86_64-darwin17]
% ruby instrument.rb ~/study/ruby
== disasm: #<ISeq:<main>@./test_condition.rb:1 (1,0)-(7,10)>============
local table (size: 1, argc: 0 [opts: 0, rest: -1, post: 0, block: -1, kw: -1@-1, kwrest: -1])
[ 1] a
0000 putstring "aaa" ( 1)[Li]
0002 setlocal a, 0
0005 getlocal a, 0 ( 2)[Li]
0008 putstring "bbb"
apiVersion: v1
kind: ServiceAccount
metadata:
namespace: monitoring
name: kube-eagle
labels:
app: kube-eagle
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
@SpringMT
SpringMT / how-hooks-work.md
Created March 19, 2019 12:46 — forked from mizchi/how-hooks-work.md
(翻訳) React Hooks は魔法ではなく、ただの配列だ

(翻訳) React Hooks は魔法ではなく、ただの配列だ

この記事は https://medium.com/@ryardley/react-hooks-not-magic-just-arrays-cd4f1857236e の日本語訳です。途中で力尽きて雑な翻訳になってる箇所がいくつかあります。


どのように Hooks が動いているか

私は、新しい Hooks の API の "magic" な挙動に悩んでいる人が結構いると聞いています。なのでこの構文の提案が、少なくとも表面的なレベルではどう動いているか、解説してみようと思います。

starting build "***********"
FETCHSOURCE
Initialized empty Git repository in /workspace/.git/
From **********/github_SpringMT_kaniko_5Ftest
* branch bb8d6d8a5d00cee2a3764cb05fdb2714a075fde0 -> FETCH_HEAD
HEAD is now at bb8d6d8 Remove WORKDIR
BUILD
Pulling image: gcr.io/kaniko-project/executor
Using default tag: latest
% docker build .
Sending build context to Docker daemon 84.99kB
Step 1/7 : FROM alpine
---> caf27325b298
Step 2/7 : RUN apk add tree
---> Using cache
---> e86ee38803f8
Step 3/7 : RUN mkdir /app
---> Using cache
---> 0e6b3d21af4c
@SpringMT
SpringMT / gist:87c138cfa011968d7a6eb67620c82316
Last active February 24, 2019 13:01
docker buildとkanikoでのビルドのCOPYの挙動の差分
@SpringMT
SpringMT / github-flow.ja.md
Created June 1, 2018 10:12 — forked from Gab-km/github-flow.ja.md
GitHub Flow (Japanese translation)

GitHub Flow

31 Aug 2011

git-flowの問題点 (Issues with git-flow)

私は人々にGitを教えるためにあちこちを飛び回っているが、最近のほぼすべてのクラスやワークショップで git-flow についてどう思うかを尋ねられた。私はいつも、git-flowは素晴らしいと思うと答えている。何百万ものワークフローを持ったシステム(Git)を提供し、ドキュメントもあるし、よくテストされている。フレキシブルなワークフローは、実に容易なやり方で多くの開発者の役に立つ。標準的なものになりつつあり、開発者はプロジェクトや企業の間を移動しつつこの標準的なワークフローに馴染むことができる。

@SpringMT
SpringMT / function.js
Created April 27, 2018 03:09 — forked from vgeshel/function.js
AWS Lambda function for forwarding SNS notifications to Slack
console.log('Loading function');
const https = require('https');
const url = require('url');
// to get the slack hook url, go into slack admin and create a new "Incoming Webhook" integration
const slack_url = 'https://hooks.slack.com/services/...';
const slack_req_opts = url.parse(slack_url);
slack_req_opts.method = 'POST';
slack_req_opts.headers = {'Content-Type': 'application/json'};
@SpringMT
SpringMT / exception.md
Created January 4, 2018 09:39 — forked from sunaot/exception.md
例外設計の話

例外設計の話。

こんな指針がいいのかなー 2013 夏 ver.

例外の目的とは?

.NET の「例外のデザインのガイドライン」にもこう書いてある。

@SpringMT
SpringMT / diff.diff
Last active November 17, 2017 15:15
< == disasm: #<ISeq:bar@./sample.rb>======================================
---
> == disasm: #<ISeq:bar@./sample2.rb>=====================================
39c39
< [ 1] foo
---
> [ 1] test
41,46c41,47
< 0001 getlocal foo, 0 <==== ローカル変数fooが定義されている
< 0004 send <callinfo!mid:baz, argc:1, FCALL|ARGS_SIMPLE>, <callcache>, nil