This file contains hidden or 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
MS4wMzZ8fDEzNzkzNzE4NDc4NjZ8MTExMTExfDI5MjA2MTE5MTg4OzcwNzA5MTMwMDg3MzsyNzs3Nzk0OzI3OzQ4Oy0xOy0xOzE3ODUxNDA2OTEyMTY3NDkzMDA7MDswOzA7MDswfDAsMTEsMTE4LDA7MTQ4LDE0OCwzNzk0NDg1MCwwOzE1LDMwLDc5OTA1LDA7MTUsMzAsMzk2NTA1LDA7MTUsMTUsMTU3NzYxNywwOzE1LDE1LDM4MTU5OTYsMDsxNSwxNSwxNTI0MTMwNiwwOzE1LDE1LDI1MjIxMjEwOSwwOzE1LDE1LDM3MDI1NjE1NzcsMDsxNSwxNSwzNzQyNDIyOTI0MCwwO3wzMDAyMzk5NzUxNTY5NDUxOzIyNTIzOTUzODI0ODM2Mjc7MjI1MTgwMDg4NzQwNTIxNzsyODE0NzQ5Nzc1NTA1NDA5OzY1NTc1NXw0NTAzNTk5NjI3MzcwNDk1OzE3NTkyMTgzOTQ3MjYz%21END%21 |
This file contains hidden or 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 | |
error(){ echo "Error: $1" 1>&2 && exit 1; } | |
if [ $# -eq 0 ]; then error 'Too few arguments.'; fi | |
if [ $# -gt 2 ]; then error 'Too many arguments.'; fi | |
clean() | |
{ | |
echo 'Clean:' | |
if [ $# -eq 0 ] |
This file contains hidden or 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
@charset "utf-8"; | |
/* labelと:checked擬似クラスで擬似onClick実装 */ | |
#snowfall label { | |
font-size: xx-large; | |
fon-weight: bold; | |
color: #fff; | |
background-color: #99f; | |
padding: .5em 1em; | |
margin: 1em 0; |
This file contains hidden or 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
EDITOR = 'vim' | |
namespace :blog do | |
desc '新しいエントリを作成' | |
task :new, [:title] do |task, args| | |
raise 'Usage: rake blog:new[title]' if args.title.nil? | |
date = Time.now.strftime("%Y-%m-%d") | |
file = "_posts/#{date}-#{args.title}.md" | |
raise file + ' is already exist.' if File.exist?(file) |
This file contains hidden or 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 | |
TARGET='staging' | |
APPDIR='~/app' | |
BRANCH='master' | |
while getopts :bdt: OPT | |
do | |
case $OPT in | |
'b' ) BRANCH="$OPTARG" ;; |
This file contains hidden or 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 -eu | |
PRODUCTNAME-help() { | |
echo -e "usage: PRODUCTNAME <command> [<args>]\n" | |
echo -e "commands:" | |
echo -e " hosts サーバ一覧を表示" | |
echo -e " git-log-remote [<hosts>] デプロイされていない差分コミットがあれば表示" | |
echo -e " check-update [<hosts>] yum パッケージの更新を表示" | |
echo -e " update [<hosts>] yum パッケージを更新" | |
echo |
This file contains hidden or 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
*nat | |
:PREROUTING ACCEPT [0:0] | |
:INPUT ACCEPT [0:0] | |
:OUTPUT ACCEPT [0:0] | |
:POSTROUTING ACCEPT [0:0] | |
-A POSTROUTING -s 10.0.0.0/16 -o eth0 -j MASQUERADE | |
COMMIT |
This file contains hidden or 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 logging | |
import asyncio | |
from threading import Thread | |
logging.basicConfig(format='%(threadName)s:%(message)s', level=logging.INFO) | |
logger = logging.getLogger() | |
async def hello(): | |
while True: | |
logger.info('Hello') |
This file contains hidden or 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 http.client import HTTPConnection | |
import numpy as np | |
# GET | |
conn = HTTPConnection('', 8080) | |
conn.request('GET', '/') | |
res = conn.getresponse() | |
conn.close() | |
print(res.status) |
This file contains hidden or 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 -u | |
image_name=docker_image_name | |
tb_container_name=tensorboard | |
port=6006 | |
app_root=$(cd $(dirname $0)/..; pwd) | |
show_help() { | |
echo "Usage: bin/tensorboard (start|stop|restart|status)" |
OlderNewer