Skip to content

Instantly share code, notes, and snippets.

View nownabe's full-sized avatar
💪
Yeah!!

Shogo Watanabe nownabe

💪
Yeah!!
View GitHub Profile
{
"inputs": "rooms",
"query": [
{
"map": {
"language": "javascript",
"source": "
function(v) {
key = v.key;
floor = key.substring(0, key.length - 2);
#!/bin/bash
## For 7 databases in 7 worlds
##
## Install:
## $ wget -O riakget.sh https://gist.github.com/nownabe/c870c1ca37501eecc9e5/raw/a74e7295ca1b501c288d633aea9c750df412b0fc/gistfile1.sh
## $ chmod +x riakget.sh
## Usage:
## $ ./riakget.sh animals polly
#!/bin/bash
## For 7 databases in 7 worlds
##
## Install:
## $ wget -O riakput.sh https://gist.github.com/nownabe/60d9a6f4e6034c2e5eae/raw/406d2a7a08a5d1ce5afd993786c11293cf3e949a/gistfile1.sh
## $ chmod +x riakput.sh
## Usage:
## $ echo '{"nickname": "Sweet Polly Purebred", "breed": "Purebred"}' | ./riakput.sh animal polly application/json
@nownabe
nownabe / gist:f1d53bd31101bef226ef
Last active August 29, 2015 14:04
[7db7w] PostgreSQL

1日目

2日目

select * from crosstab(
  'select extract(week from starts) as week,
          extract(dow from starts) as dow,
          count(*)
  from events

CentOSセットアップ

CentOSインストール

CentOSネットワーク設定

# sed -i 's/ONBOOT=no/ONBOOT=yes/' /etc/sysconfig/netwrok-scripts/ifcfg-eth0
# ifup eth0
# ifconfig