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
# ↓のように、yabai_funcをモジュールグローバルで呼んでる状態を直す | |
#yabai_obj = yabai_func() | |
def yabai_obj(): | |
global yabai_obj | |
obj = yabai_func() | |
yabai_obj = lambda: obj | |
return obj |
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 itertools import * | |
for x in izip(cycle(['', '', 'fizz']), cycle(['', '', '', '', 'buzz']), count(1)): | |
print x[0] + x[1] or x[2] |
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 | |
for sei, na in itertools.izip(range(1, 1001), itertools.cycle("ABCDEFGHIJKLMNOPQRSTUVWXYZ")): | |
print(u"{sei}反田{na}".format(sei=sei, na=na)) |
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) |
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
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
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
- 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
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
#!/bin/sh | |
# usage | |
# dcon PIECE_OF_CONTAINER_NAME [COMMAND [ARGUMENTS...]] | |
# | |
# example | |
# $ dcon app1 | |
# $ dcon postg psql -U myuser mydatabase | |
name=$1 | |
shift 1 |
OlderNewer