This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git gojson/gojson.go gojson/gojson.go | |
index 567a416..fdb8acf 100644 | |
--- gojson/gojson.go | |
+++ gojson/gojson.go | |
@@ -45,6 +45,7 @@ package main | |
import ( | |
"flag" | |
"fmt" | |
+ "go/format" | |
"io" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"bufio" | |
"io" | |
"log" | |
"net/http" | |
"os" | |
"path/filepath" | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash -e | |
echo "1. Create temporary directory" | |
mkdir tmp && cd tmp | |
echo "2. Download install script" | |
wget https://raw.githubusercontent.com/coreos/init/master/bin/coreos-install | |
wget https://gist.githubusercontent.com/Ladicle/c2dde654a4388aa347f2b575e2a17da1/raw/af963e4eabc5e77f252eccbacdc0eef9da3699f6/cloud-config.yml | |
echo "3. Install coreos to /dev/sda" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
flake8 | awk -F : '{print "+"$2":"$3" "$1}'| xargs -n2 emacsclient -nw -a "" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0"?> | |
<root> | |
<item> | |
<name>[Realforce] eiji mode</name> | |
<identifier>private.mode.realforce</identifier> | |
<autogen> | |
__KeyToKey__ | |
KeyCode::KEY_0, ModifierFlag::NONE, | |
KeyCode::MINUS, MODIFIERFLAG_EITHER_LEFT_OR_RIGHT_SHIFT | |
</autogen> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def deep_symbolize_keys | |
self.each_with_object({}) do |(key, val), memo| | |
if val.is_a?(Array) | |
val = val.map{|v| v.deep_symbolize_keys} | |
elsif val.is_a?(Hash) | |
val = val.deep_symbolize_keys | |
end | |
memo[key.to_s.to_sym] = val | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
perl -pe "s/INFO|DEBUG|^D|^I/\e[1;33m$&${DEFO}/g;s/Finish|[Ss]uccess|SUCCESS/\e[1;32m$&\e[0m/g;s/^F|ERROR|Error|FAIL|Fail/\e[1;31m$&\e[0m/g;s/Start|START|start[^=]/\e[1;36m$&\e[0m/g;s/ \[[^\]]*\]/\e[1;35m$&\e[0m/g" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
function usage() { | |
echo "" | |
echo "$(basename ${0}) is a tool to connect to multi servers on same time" | |
echo "" | |
echo "Usage:" | |
echo " $(basename ${0}) [<options>] hostname..." | |
echo "Options:" | |
echo " --window, -w [name] set window name" |
NewerOlder