Skip to content

Instantly share code, notes, and snippets.

@hideack
hideack / s3client.rb
Created October 7, 2012 06:14
AWS::S3 sample
require 'aws/s3'
include AWS::S3
DEFAULT_HOST.replace "(s3 hostname)"
Base.establish_connection!(
:access_key_id => '_YOUR_AWS_KEY_',
:secret_access_key => '_your_aws_secret_',
)
@hideack
hideack / Start up log
Created March 31, 2013 02:51
Start up log
DEBUG - GET (0.0100s) / - 200 OK
INFO - Login status multi casted via websocket.
INFO - FB API called.(/me)
DEBUG - GET (1.2059s) /api/me - 200 OK
INFO - FB API called.(/me/friends?offset=0&limit=1000)
DEBUG - GET (0.7823s) /api/friends - 200 OK
DEBUG - GET (0.3324s) /api/library/100005623〜 - 404 Not Found
DEBUG - POST (0.3522s) /api/library - 200 OK
DEBUG - POST (0.3902s) /api/library - 200 OK
DEBUG - POST (0.3297s) /api/library - 200 OK
require 'mina/bundler'
require 'mina/rails'
require 'mina/git'
require 'mina/rbenv' # for rbenv support. (http://rbenv.org)
# require 'mina/rvm' # for rvm support. (http://rvm.io)
# Basic settings:
# domain - The hostname to SSH to.
# deploy_to - Path to deploy into.
# repository - Git repo to clone from. (needed by mina/git)
$ graph-easy < sample.txt (~/tmp)
+ - - - - - - - - - - - - - - - - +
' LXC: '
' '
+----------+ WAN +----------------+ LAN ' +---------+ ref +----------+ '
| Internet | -----> | nginx | -----> ' | remp001 | -----> | mongo001 | '
+----------+ +----------------+ ' +---------+ +----------+ '
| ' ^ '
| LAN ' | '
v ' | '
$ graph-easy < sample.txt
+ - - - - - - - - - - - - - - - - +
' LXC: '
' '
+----------+ WAN +----------------+ LAN ' +---------+ ref +----------+ '
| Internet | -----> | nginx | -----> ' | remp001 | -----> | mongo001 | '
+----------+ +----------------+ ' +---------+ +----------+ '
| ' ^ '
| LAN ' | '
v ' | '

pt

☁  20141230_wikipedia  time pt コロスケ jawiki-latest-all-titles
jawiki-latest-all-titles:
969851:奈良崎コロスケ
2180964:コロスケ
2180965:コロスケ123123
2180966:コロスケ准将
2180967:コロスケ@1億円
_____ ___ ____ ___ (_) ___ _____ ____ _
/ ___/ / _ \ / __ `__ \ / / / _ \ / ___/ / __ `/
/ / / __/ / / / / / / / / / __/ / / / /_/ /
/_/ \___/ /_/ /_/ /_/ /_/ \___/ /_/ \__,_/
require('date-utils');
var blessed = require('blessed'),
contrib = require('blessed-contrib'),
screen = blessed.screen(),
grid = new contrib.grid({rows: 1, cols: 2}),
grid2 = new contrib.grid({rows: 2, cols: 1}),
smc = require('smc'),
Tail = require('tail').Tail;
@hideack
hideack / gist:987b7c3bf865f090149e
Created February 21, 2015 08:38
moment.jsで1日前の日時を取得
> moment().add('days', -1).format("YYYY-MM-DD")
'2015-02-20'
> moment().add('days', -2).format("YYYY-MM-DD")
'2015-02-19'
* { font-size: 12px; }
body { background: #222; color: #e6e6e6;}
a { color: #949494; }
a:link, a:visited { color: #949494; }
a:hover, a:active, a:focus { color: #c7c7c7; }