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
MODECMD='/mnt/c/Windows/System32/mode.com' | |
COMPORT1=$(${MODECMD}|grep -o 'COM[0-9]*') | |
COMPORT2="" | |
while [ "$COMPORT2" = "" ];do | |
sleep 0.5 | |
printf "." | |
COMPORT2=$(${MODECMD}|grep -v '${COMPORT1}'|grep -o 'COM[0-9]*') | |
done | |
PORTNUM=$(echo $COMPORT2|sed -e 's/COM//') | |
avrdude -c avr109 -p atmega32u4 -P /dev/ttyS${PORTNUM} -U flash:w:$* |
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
#!/usr/local/bin/python3 | |
import sys | |
import argparse | |
parser = argparse.ArgumentParser() | |
parser.add_argument('text', type=str, default=sys.stdin, nargs='?') | |
grp = parser.add_mutually_exclusive_group(required=True) | |
grp.add_argument('--decode', '-d', action='store_true', default=True) | |
grp.add_argument('--encode', '-e', action='store_true', default=False) |
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/sh | |
# usage | |
# datt PIECE_OF_CONTAINER_NAME | |
# | |
# example | |
# $ datt app1 | |
# $ datt postg psql -U myuser mydatabase | |
# | |
# This is useful for using pdb. |
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/sh | |
# usage | |
# dcon PIECE_OF_CONTAINER_NAME [COMMAND [ARGUMENTS...]] | |
# | |
# example | |
# $ dcon app1 | |
# $ dcon postg psql -U myuser mydatabase | |
name=$1 | |
shift 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
void(!function(d){function x(nodes){for(var i in nodes){var n=nodes[i];if(n.nodeType==3){var nt="";for(var i in n.wholeText){if(!/[\s\nがぎぐげござじずぜぞだぢづでどばびぶべぼぱぴぷぺぽガギグゲゴザジズゼゾダヂヅデドバビブベボパピプペポ]/.test(n.wholeText[i])){nt+=n.wholeText[i]+"\u3099";}else{nt+=n.wholeText[i]}}n.textContent=nt}else{x(n.childNodes)}}}x(d.body.childNodes)}(document)); |
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
- hosts: foo | |
tasks: | |
- command: ssh-keygen ... | |
- fetch: | |
src: ~/.ssh/id_rsa.pub | |
dest: _pubkey | |
- hosts: bar | |
tasks: | |
- authorized_key: |
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
1. インスペクタを開き、艦隊情報タブを開く | |
2. 左下のボタンを長押しし、出てきたボタンを押してインスペクタをウィンドウ化 | |
参考: http://gyazo.com/a5f1ebcde0ab2460b506e29898ee86c1 | |
3. ウィンドウ化したインスペクタにフォーカスを合わせ、Ctrl+Shift+Jでインスペクタのインスペクタを開く | |
4. 開いたインスペクタ上でsources > hcjpbcmhppmlohedljpeagnjplpjonhc/js/dispatcher.jsをダブルクリックして開く | |
5. 開いたソースの17行目"hdr.execute(content);"の上に以下のコードを追加 | |
console.log(content); | |
5.参考画像: http://gyazo.com/208b0e4c93da5f5e0baf7d0eaa979d35 |
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
server { | |
# UAからOSを検出 | |
set $osversion ""; | |
if ($http_user_agent ~ "AppleWebKit/(\d{3})"){ | |
set $osversion ".AppleWebKit.$1"; | |
} | |
# manifestファイルはOS個別のものがあればそちらを出す | |
# なければ/static/manifest/にあるデフォルトを使う |
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
$(function (){ | |
$('tr').each(function (i, e){ | |
var row = $(e); | |
var link = $(row.children()[2]) | |
var a = link.children('a'); | |
var url = a.attr('href'); | |
if (!url) {return;} | |
url = url.split('/'); | |
user_id = url[url.length-1]; | |
var yasumi_key = 'yasumi_' + user_id; |
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: utf8 | |
from itertools import cycle | |
for wd in cycle((u"月",u"月",u"火",u"水",u"木",u"金",u"金")): | |
print(wd) |
NewerOlder