Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
set -e -o pipefail
if [ -z "$GITHUB_TOKEN" ];then
echo "GITHUB_TOKEN を設定してください"
exit -1
fi
if [ -z "$1" ];then
echo "引数に組織名を入れてください"
exit -1
@nazoking
nazoking / aws_amazon_saml.userScript.js
Last active July 12, 2019 02:25
aws_amazon_saml.userScript.js
// ==UserScript==
// @name AWS SAML
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @match https://signin.aws.amazon.com/saml
// @grant none
// ==/UserScript==

test

huge 'hoge huge huga' hoga

</html>

# Zero width spaces
@nazoking
nazoking / mysql.sh
Created July 21, 2017 05:16
環境変数から見合ったmysql(バージョン、ポート、データdir等)を起動する。direnvと一緒に使う
#!/bin/bash
set -e
set -o pipefail
set -u
# set -x
function !!
{
echo "$@"
"$@"
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
class Repeater{
static tracker_collect(tracker){
switch(type(tracker)){
case 'function':
return tracker;
case 'undefined':
case 'null':
return (value, index, list) => value;
case 'number':
case 'string':
@nazoking
nazoking / start_spot.sh
Last active September 15, 2016 04:33
スポットインスタンスを立ててボリュームをアタッチしてIPをHOSTファイルに保存する
#!/bin/bash
set -e
set -x
set -u
AWS_DEFAULT_REGION=us-west-1
INSTANCE_TYPE=c4.2xlarge
# イメージID
IMAGE_ID=ami-xxxxxx
@nazoking
nazoking / check_spot.sh
Created September 15, 2016 04:07
spot インスタンスが止められそうなら stop ファイルを作る
#!/bin/bash
# スポットインスタンスの停止イベントをチェックして stop ファイルを書き出す
set -e
BASE_DIR=$(dirname $0)
STOP_FILE=${STOP_FILE-$BASE_DIR/stop}
PID_FILE=${PID_FILE-$BASE_DIR/check_stop.pid}
@nazoking
nazoking / Dockerfile
Last active August 26, 2016 06:00
tensorflow + gensim + mecab + neolgd
# よさげなタグを選ぶ https://hub.docker.com/r/tensorflow/tensorflow/tags/
FROM tensorflow/tensorflow:0.10.0rc0-gpu
# mecab + neologd
RUN apt-get update && apt-get install -y \
mecab \
python-mecab \
mecab-ipadic-utf8 \
libmecab-dev \
&& \