Skip to content

Instantly share code, notes, and snippets.

Tatsuru WATANABE tatsuru

Block or report user

Report or block tatsuru

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:8837289
%type 通知の種類
%sname 相手の名前
%fname ファイル名
%fpath ファイルのパス?
%smessage メッセージ
%fsize ファイルサイズ
%sskype ?
tatsuru / Dockerfile
Created Apr 16, 2014
ikachan dockerfile
View Dockerfile
# Ikachan Dockerfile
FROM tatsuru/debian
RUN apt-get update
RUN apt-get install -y build-essential curl libssl-dev
RUN curl -s > /tmp/perl-install
RUN bash /tmp/perl-install 5.18.2 /opt/perl-5.18
View app.psgi
use Plack::Builder;
my $app = sub {
return [ 200, [ 'Content-Type' => 'text/plain' ], [ 'Hello World' ] ];
builder {
enable "ServerStatus::Lite", path => '/server-status', allow => [''], scoreboard => '/dev/shm/server-status', counter_file => '/tmp/counter_file';
View gist:70437490e1fb1bb0c7df
#!/usr/bin/env ruby
require 'json'
def parse(uri)
JSON.parse `curl #{uri}`.gsub("/*\n * This file is intended for use only on We do not guarantee its availability or accuracy.\n *\n * Copyright 2014, Inc. or its affiliates. All rights reserved.\n */\ncallback({",'{').gsub("\);", '').gsub(/([a-zA-Z]+):/, '"\1":')
table = {
:light => parse(''),
tatsuru /
Last active Aug 29, 2015
X240 Battery Plugin for
# [plugin.metrics.battery]
# command = "/path/to/"
if [ x$MACKEREL_AGENT_PLUGIN_META = x1 ]; then
cat <<EOF
View .psqlrc
\timing on
\set HISTSIZE 1000000
\pset pager off
View GCE.txt
- GCE 個人アカウント作る。$300 無料すごい
- なんか既にプロジェクトがあった。前に作ったGAEっぽい
- gcutil deprecated って言われてた
-- のでこっちでやる
-- gcutil を PATH から消せとか zshrc への追加とかいろいろやってくれて便利
- startup-script 便利
-- gcloud compute instances create test01 --metadata startup-script="apt update; apt install -y nginx-full" --image debian-8
- metadata
-- 変なヘッダつけないと 403
--- curl -H "Metadata-Flavor: Google" http://metadata/computeMetadata/v1/instance/disks/0/mode
tatsuru / dot.notify_tumblr.yaml
Created Jul 17, 2011
Tumblr Desktop Notification with libnotify
View dot.notify_tumblr.yaml
directory: /home/tatsuru/.tumblr-cache
max: 1000
limit: 10
check_interval: 30
notify_timeout: 30
text_length: 100
tatsuru / split_gif.rb
Created Jul 20, 2011
Generate divided gif animation for Thumblr
View split_gif.rb
#!/usr/bin/env ruby
require 'rubygems'
require 'RMagick'
def split(src, n)
width = src.columns
height = src.rows
crop_list = []
tatsuru / count_tumblr.rb
Created Aug 29, 2011
count tumblr posts/day
View count_tumblr.rb
#!/usr/bin/env ruby
require 'tumblife'
require 'yaml'
if ARGV.length < 2
puts "Usage: count_tumblr.rb blogname outfile [limit]"
exit 0
You can’t perform that action at this time.