2015-12-06 作成
- AWSのサービスの概要を理解する
rsync -ra pi:/tmp/hoge /tmp |
@echo off | |
chdir %* | |
set BRANCH= | |
for /f "eol=; tokens=1,2 delims== " %%i in ('"git branch 2>NUL"') do if "%%i"=="*" set BRANCH=%%j | |
if "%BRANCH%" neq "" ( | |
set PROMPT=$P^(%BRANCH%^)$G | |
) else ( | |
set PROMPT=$P$G | |
) |
#!/bin/sh | |
# You should language as english | |
# LANG=C | |
# Export new files or directories | |
diff -rq a b | grep "Only in" | cut -d":" -f2 | tr -d " " > new.txt | |
# Export diff files | |
diff -rq a b | grep "Files" | grep "differ" | cut -d " " -f2 > diff.txt |
//This is sample source code. | |
package main | |
import ( | |
"cloud.google.com/go/bigquery" | |
"fmt" | |
"golang.org/x/net/context" | |
"golang.org/x/oauth2/google" | |
bq "google.golang.org/api/bigquery/v2" | |
"google.golang.org/api/iterator" |
最新のARM版mackerel-agentをダウンロード
# URLが最新かどうかはチェックするように
wget https://github.com/mackerelio/mackerel-agent/releases/download/v0.30.2/mackerel-agent_linux_arm.tar.gz
tar xzfv mackerel-agent_linux_arm.tar.gz
cd mackerel-agent_linux_arm.tar
設定ファイルの編集
# `# apikey = ""` となっている部分にAPIKEY(Makerelで取得可能)を入れコメントを外す。
#!/bin/sh | |
# | |
# Copy iTunes Music data into iCloud drive. | |
# This script placed on https://gist.github.com/pyohei/2a5fe506be29e07b89428198268be4dc | |
# If you modify, you reflect it on the upper gist!! | |
# | |
# Licence: MIT | |
ICLOUD_DIR="/Users/${USER}/Library/Mobile Documents/com~apple~CloudDocs" |
# Need to install twine | |
python setup.py sdist | |
twine upload dist/* |
"""This text contain `----fileName` as break point.""" | |
FILE_NAME = 'all.txt' | |
with open(FILE_NAME, mode='r') as f: | |
_f = None | |
for line in f.readlines(): | |
if line.startswith('----'): | |
if _f: | |
_f.close() | |
_file_name = line.lstrip('-').rstrip('\r\n') |
"""URLの一覧を抽出するスクリプト | |
簡易的に作成したものなので、コンテナの中に入って直接実行する必要がある。 | |
PYTHONPATHなどを事前に通しておけば、コンテナ外からも動作する可能性はある。 | |
""" | |
from collections import OrderedDict | |
import django; django.setup() | |
from backoffice.coke import urls |