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 | |
git ls-tree -rt --name-only HEAD | while read x; do | |
touch -t $(git log -1 --format=%ci "$x" | jq -r -R '. | strptime("%Y-%m-%d %H:%M:%S %z") | strftime("%Y%m%d%H%M.%S")') "$x" | |
done |
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 | |
# cf. | |
# https://www.elastic.co/guide/en/kibana/6.4/saved-objects-api-find.html | |
# https://www.elastic.co/guide/en/kibana/6.4/saved-objects-api-bulk-get.html | |
URL_BASE=http://localhost:5601 | |
curl -s ${URL_BASE}/api/saved_objects/_find?per_page=1000 \ | |
| jq '[.saved_objects[]|{"id", "type"}]' \ |
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
from elasticsearch import Elasticsearch | |
import socks | |
import socket | |
socks.set_default_proxy(socks.SOCKS5, "localhost", 1080) | |
socket.socket = socks.socksocket | |
host = "your_es_host" | |
port = 443 | |
scheme = "https" |
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
import itertools | |
def each_slice(n, seq): | |
args = [iter(seq)] * n | |
return itertools.zip_longest(fillvalue=None, *args) |
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
# -*- coding: utf-8 -*- | |
import BaseHTTPServer | |
from StringIO import StringIO | |
class MyHandler(BaseHTTPServer.BaseHTTPRequestHandler): | |
"""これをテストしたい""" | |
def do_GET(self): | |
print("executing do_GET") |
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
Error NoMethodError: backtrace: | |
/Users/kuryu/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/td-client-1.0.6/lib/td/client/api/job.rb:348:in `rescue in job_result_download' | |
/Users/kuryu/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/td-client-1.0.6/lib/td/client/api/job.rb:318:in `job_result_download' | |
/Users/kuryu/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/td-client-1.0.6/lib/td/client/api/job.rb:179:in `job_result_each_with_compr_size' | |
/Users/kuryu/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/td-client-1.0.6/lib/td/client.rb:253:in `job_result_each_with_compr_size' | |
/Users/kuryu/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/td-client-1.0.6/lib/td/client/model.rb:574:in `result_each_with_compr_size' | |
/Users/kuryu/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/td-0.16.1/lib/td/command/job.rb:460:in `render_result' | |
/Users/kuryu/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/td-0.16.1/lib/td/command/job.rb:282:in `show_result' | |
/Users/kuryu/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/td-0.1 |
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 | |
# cf. https://github.com/itamae-kitchen/mitamae/releases | |
version="v1.6.3" | |
typeset -l name | |
name="mitamae-$(uname -m)-$(uname -s)" | |
curl -L --create-dirs -o /usr/local/bin/mitamae https://github.com/itamae-kitchen/mitamae/releases/download/${version}/${name} | |
chmod +x /usr/local/bin/mitamae |
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
+t1: | |
py>: a.ok | |
arg1: 111 | |
+t2: | |
py>: a.ng | |
arg1: 111 | |
arg2: 222 | |
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
_export: | |
target_month: ${moment().format("YYYY-MM")} | |
+OK: | |
_export: | |
days: "31" | |
for_range>: | |
from: 0 | |
to: ${days} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.