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
%type 通知の種類 | |
%sname 相手の名前 | |
%fname ファイル名 | |
%fpath ファイルのパス? | |
%smessage メッセージ | |
%fsize ファイルサイズ | |
%sskype ? | |
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
# Ikachan Dockerfile | |
FROM tatsuru/debian | |
RUN apt-get update | |
RUN apt-get install -y build-essential curl libssl-dev | |
RUN curl -s https://raw.githubusercontent.com/tagomoris/xbuild/master/perl-install > /tmp/perl-install | |
RUN bash /tmp/perl-install 5.18.2 /opt/perl-5.18 |
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
use Plack::Builder; | |
my $app = sub { | |
return [ 200, [ 'Content-Type' => 'text/plain' ], [ 'Hello World' ] ]; | |
}; | |
builder { | |
enable "ServerStatus::Lite", path => '/server-status', allow => ['127.0.0.1'], scoreboard => '/dev/shm/server-status', counter_file => '/tmp/counter_file'; | |
$app; | |
}; |
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/bin/env ruby | |
require 'json' | |
def parse(uri) | |
JSON.parse `curl #{uri}`.gsub("/*\n * This file is intended for use only on aws.amazon.com. We do not guarantee its availability or accuracy.\n *\n * Copyright 2014 Amazon.com, Inc. or its affiliates. All rights reserved.\n */\ncallback({",'{').gsub("\);", '').gsub(/([a-zA-Z]+):/, '"\1":') | |
end | |
table = { | |
:light => parse('http://a0.awsstatic.com/pricing/1/ec2/previous-generation/light_linux.min.js'), |
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/bash | |
# | |
# [plugin.metrics.battery] | |
# command = "/path/to/x240battery.sh" | |
# | |
LANG=C | |
if [ x$MACKEREL_AGENT_PLUGIN_META = x1 ]; then | |
cat <<EOF |
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
\timing on | |
\set HISTSIZE 1000000 | |
\pset pager off |
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
- GCE 個人アカウント作る。$300 無料すごい | |
- なんか既にプロジェクトがあった。前に作ったGAEっぽい | |
- gcutil deprecated って言われてた https://cloud.google.com/compute/docs/gcutil/ | |
-- のでこっちでやる https://cloud.google.com/compute/docs/gcloud-compute/#install | |
-- gcutil を PATH から消せとか zshrc への追加とかいろいろやってくれて便利 | |
- startup-script 便利 | |
-- gcloud compute instances create test01 --metadata startup-script="apt update; apt install -y nginx-full" --image debian-8 | |
- metadata https://cloud.google.com/compute/docs/metadata | |
-- 変なヘッダつけないと 403 | |
--- curl -H "Metadata-Flavor: Google" http://metadata/computeMetadata/v1/instance/disks/0/mode |
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
cache: | |
directory: /home/tatsuru/.tumblr-cache | |
max: 1000 | |
dashboard: | |
limit: 10 | |
check_interval: 30 | |
notify_timeout: 30 | |
text_length: 100 |
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/bin/env ruby | |
require 'rubygems' | |
require 'RMagick' | |
def split(src, n) | |
width = src.columns | |
height = src.rows | |
crop_list = [] |
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/bin/env ruby | |
require 'tumblife' | |
require 'yaml' | |
if ARGV.length < 2 | |
puts "Usage: count_tumblr.rb blogname outfile [limit]" | |
exit 0 | |
end |
OlderNewer