Skip to content

Instantly share code, notes, and snippets.

                         +––––––––++––––––––++––––––––++––––––––+                     
                         | puller ++ puller ++ puller ++ puller |                     
                         +––––+–––++––––––––++––––––––++–––+––––+                     
                         |    |                            |    |                     
                         |push|                            |push|                     
                         |    |                            |    |                     
                         +––––+   +––––––––+   +––––––––+  +––––+    +–––––––––––––––+
                         |    +–––+ events +–––+ redis  |  |    +––––+ elasticsearch |
                         |    |   +––––––––+   +––––––––+  |    |    +–––––––––––––––+
@stwind
stwind / stage
Last active August 29, 2015 14:18
# vi: set ft=config :
webapp.stage.domain ansible_ssh_host=10.0.3.1
mysql.stage.domain ansible_ssh_host=10.0.3.2
[all:vars]
envn=stage
[webapps]
webapp.stage.domain
---
- hosts: mysql
sudo: true
vars_files:
- vars/{{envn}}/common.yml
- vars/{{envn}}/mysql.yml
roles:
- ANXS.mysql
tags: ['mysql']
#!/usr/bin/env python
import sys, os, string, argparse
def get_args():
parser = argparse.ArgumentParser()
parser.add_argument('-t','--tags')
parser.add_argument('env', type=str, help='environment to provision')
return parser.parse_args(sys.argv[1:])

光るグラフィック展
“Illuminating Graphics”
会期:2014.2.21 金 - 3.31 月
時間:11:00a.m.-7:00p.m. 日曜・祝日休館 入場無料

介绍

本展将每个作家的作品放在同样大小的灯箱中进行展览。策展人是Semitransparent Design的田中良治。

@stwind
stwind / test.md
Last active August 29, 2015 14:25

DiSTributed WorKeR application based on riak_core.

@stwind
stwind / bcpgp.clj
Last active February 17, 2016 04:09
(defn encrypt-bytes
[bytes dest ^PGPPublicKey pubkey]
(let [buf-size 0x1000
ld (PGPLiteralDataGenerator.)
enc (doto (BcPGPDataEncryptorBuilder. PGPEncryptedData/TRIPLE_DES)
(.setWithIntegrityPacket true)
(.setSecureRandom (SecureRandom.)))
gen (doto (PGPEncryptedDataGenerator. enc)
(.addMethod (BcPublicKeyKeyEncryptionMethodGenerator. pubkey)))
com (PGPCompressedDataGenerator. PGPCompressedData/ZIP)]
± erl
Erlang/OTP 18 [erts-7.3] [source] [64-bit] [smp:4:4] [async-threads:10] [hipe] [kernel-poll:false] [dtrace]

Eshell V7.3  (abort with ^G)
1> {ok,Props} = escript:extract("rebar3",[]).
{ok,[{shebang,default},
     {comment,[]},
     {emu_args,"+sbtu +A0"},
#include<iostream>
class Something
{
public:
Something() { std::cout << "2"; }
virtual ~Something() { std::cout << "4"; }
};
class Parent
- name: Set apt http_proxy
copy:
content: "Acquire::http::proxy \"http://<host>:<port>/\";\nAcquire::https::proxy \"https://<host>:<port>/\";"
dest: /etc/apt/apt.conf
mode: 0644
- name: Remove apt proxy
file:
path: /etc/apt/apt.conf
state: absent