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
https://riak.com/products/riak-kv/index.html |
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
import collections | |
a = [1,1,2,3,3,3,5,5,5] | |
counter = collections.Counter(a) | |
[value for (value, count) in counter.items() if count > 1] | |
# [1, 3, 5] |
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
import collections | |
class Immutable ( | |
collections.namedtuple('Immutable', [ | |
'var1', | |
'var2', | |
'var3', | |
]) | |
): | |
# Avoid using dict to store fields as namedtuple docs |
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 strict'; | |
var GitHubApi = require('github'), | |
Promise = require('bluebird'), | |
sprintf = require('sprintf'); | |
var github = new GitHubApi({ | |
version: '3.0.0', | |
protocol: 'https', | |
}); |
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
aws cloudwatch get-metric-statistics --namespace AWS/RDS --metric-name FreeStorageSpace --start-time 2016-01-04T14:00:00 --end-time 2016-01-04T14:01:00 --period 60 --statistics Minimum --dimensions Name=DBInstanceIdentifier,Value=development |
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
>>> org = '11:00:00 512 256' | |
>>> dict(zip([sce["name"] for sce in sc], org.split())) | |
{'time': '11:00:00', 'hoge': '512'} | |
>>> sc = [{"name":"time", "type":"INTEGER"},{"name":"hoge", "type":"INTEGER"},{"name":"fuga", "type":"STRING"}] | |
>>> dict(zip([sce["name"] for sce in sc], org.split())) | |
{'time': '11:00:00', 'fuga': '256', 'hoge': '512'} |
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
var zmq = require('zeromq'); | |
s = zmq.createSocket('push'); | |
s.connect('tcp://127.0.0.1:15000'); | |
while (true) { // ZOMG he did it again! | |
s.send(new Buffer("test")); | |
} |
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
var async = require('async'); | |
var exec =require('child_process').exec | |
var plays = [] | |
var datum = ["hello", "world"] | |
var cmd = function (msg, logger) { | |
var command = "echo " + msg + "; sleep 10" | |
var proc = exec(command, | |
{ |
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
openssl x509 -noout -text -in (crtファイル) |
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
# install pyenv using pyenv-installer | |
$ curl -L https://raw.githubusercontent.com/yyuu/pyenv-installer/master/bin/pyenv-installer | bash | |
(vi ~/.bash_profile) | |
$ sudo yum install @Development | |
$ sudo yum install bzip2-devel openssl-devel readline-devel sqlite-devel |
NewerOlder