Skip to content

Instantly share code, notes, and snippets.

View siroken3's full-sized avatar

Kenichi Sasaki siroken3

View GitHub Profile

非破壊 TypeSctript

mizchi / TypeScript Meetup 2


About

  • mizchi / 竹馬光太郎
  • フロントエンドと Node.js
@hanabokuro
hanabokuro / install_plevn.sh
Last active August 29, 2015 14:07
install plenv
sudo git clone https://github.com/tokuhirom/plenv.git /usr/local/plenv
sudo mkdir /usr/local/plenv/plugins
sudo git clone https://github.com/tokuhirom/Perl-Build.git /usr/local/plenv/plugins/perl-build
sudo sh -c 'PLENV_ROOT=/usr/local/plenv PATH="$PLENV_ROOT/bin/:$PLENV_ROOT/shims:$PATH" plenv install 5.18.2'
sudo sh -c 'PLENV_ROOT=/usr/local/plenv PATH="$PLENV_ROOT/bin/:$PLENV_ROOT/shims:$PATH" plenv install 5.20.1'
sudo sh -c 'PLENV_ROOT=/usr/local/plenv PATH="$PLENV_ROOT/bin/:$PLENV_ROOT/shims:$PATH" plenv install-cpanm'
@pataiji
pataiji / 1.HOWTO.md
Last active February 29, 2020 22:46
S3 + CloudFront で特定のパスへのアクセスをリダイレクトさせる
  1. S3の'Static Website Hosting'を有効にする
  2. 'Edit Redirection Rules'を編集する
  3. 'bucket policy'を編集する
  4. CLoudFrontのOriginにS3の'Static Website Hosting'のEndpointを指定する
@hayajo
hayajo / 00.md
Last active March 8, 2020 16:05
NDS#36 Go言語入門
@marcusphi
marcusphi / ansible_conditionals_examples.yaml
Created October 2, 2013 09:48
Ansible 1.3 Conditional Execution -- Very complete example with comments -- I find the conditional expressions to be ridiculously hard to get right in Ansible. I don't have a good model of what's going on under the surface so I often get it wrong. What makes it even harder is that there has been at least three different variants over the course …
---
# This has been tested with ansible 1.3 with these commands:
# ansible-playbook -i hosts ansible_conditionals_examples.yaml --extra-vars="hosts=myhosts isFirstRun=false"
# ansible-playbook -i hosts ansible_conditionals_examples.yaml --extra-vars="hosts=myhosts isFirstRun=true"
# ansible-playbook -i hosts ansible_conditionals_examples.yaml --extra-vars="hosts=myhosts"
# NB: The type of the variable is crucial!
- name: Ansible Conditionals Examples
hosts: $hosts
vars_files:
@waffle2k
waffle2k / cidr2regex.py
Created April 3, 2012 18:04
Convert CIDR notation to regex
#!/usr/bin/python
''' Not my script, found on the Internet, and rediscovered on my hard drive
'''
import sys
def cidr_to_regex(cidr):
ip, prefix = cidr.split('/')
base = 0
for val in map(int, ip.split('.')):
@teepark
teepark / btree.py
Created September 9, 2010 22:45
a pure-python B tree and B+ tree implementation
import bisect
import itertools
import operator
class _BNode(object):
__slots__ = ["tree", "contents", "children"]
def __init__(self, tree, contents=None, children=None):
self.tree = tree