Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
I may be slow to respond.

NAKAMURA, Tomohiro tomoh1r

💭
I may be slow to respond.
View GitHub Profile
View sphinxcontrib_staticdir_hack.py
# -*- coding: utf-8 -*-
#
# Sphinx extension for renaming _static/ directory
#
# Author: Takeshi KOMIYA / License: BSD
#
import re
import os
import shutil
@jasonbrooks
jasonbrooks / atomic-hello-k8s.md
Last active Aug 29, 2015
atomic kubernetes hello world
View atomic-hello-k8s.md

Testing Kubernetes with an Atomic Host

Atomic hosts include Kubernetes for orchestration and management of containerized application deployments, across a cluster of container hosts. If you're interested in taking Kubernetes for a spin on an Atomic host, read on!

Kubernetes+Atomic Hello World

First, boot into CentOS Atomic host. You ought to be able to use Fedora Atomic as well, but currently, Atomic Fedora comes with an earlier version of kubernetes, so for each of the kubectl commands in this howto, there's a different kubecfg command, for now.

Due to a bug in CentOS Atomic (not necessary in Fedora Atomic), you must:

View cc500.vim
" This is a port of CC500
" http://homepage.ntlworld.com/edmund.grimley-evans/cc500/
"
"-------------------------------------------------------------------------------
" ORIGINAL HEADER
"-------------------------------------------------------------------------------
" Copyright (C) 2006 Edmund GRIMLEY EVANS <edmundo@rano.org>
"
" This program is free software; you can redistribute it and/or modify
" it under the terms of the GNU General Public License as published by
View testutil.py
# -*- coding: utf-8 -*-
from datetime import datetime
import contextlib
import unittest
@contextlib.contextmanager
def mock_datetime_now(module_path, return_value):
"""
適当なモジュールの datetime.now() を mock し、適当な日付を返すようにする。
View nexus7.md

Nexus7買いました

あるいは、Nexus7上にDebian環境を構築するときのメモ。

TODO

だれかおしえてください。

  • キーボードの配列変更(Dvorak配列 + Ctrl-CapsLock入れ替え)
  • 画面幅が80文字に固定される
  • スワップを有効にしたほうがいい?
@methane
methane / README.md
Last active Mar 17, 2016
Quick benchmark on PyMySQL
View README.md
time[sec]
CPython 3.4.2(6f78fcb) 20.5
CPython 3.4.2(a724607) 14.2
PyPy 2.5 (6f78fcb) 3.4
PyPy 2.5 (a724607) 3.1
CPython (mysqlclient) 2.8

Dataset is "world database (innodb)". It is deployed on here

@katzchang
katzchang / rule.md
Last active Sep 15, 2016
新社会人が守るべきだがほとんど誰も教えてくれない社会のルール
View rule.md

新社会人が守るべきだがほとんど誰も教えてくれない社会のルール

  • トイレットペーパーホルダーが二つあるトイレでは、紙が少ないほうを先に使いましょう
@melpon
melpon / yakinikutabetaiJP.rst
Last active Oct 18, 2016
焼肉食べたいリスト
View yakinikutabetaiJP.rst
View react-problems.md

React/FluxでSPAを開発してぶちあたった問題

(この資料は専用のプリプロセッサで動くことを全体にしたドキュメントです)

React/FluxでSPAを開発してぶちあたった問題

mizchi / Increments, Inc.

@ React Meetup #1

@atabary
atabary / dblock.py
Created May 26, 2012
MySQL table lock with django
View dblock.py
#-*- coding: utf-8 -*-
import contextlib
from django.db import connection
@contextlib.contextmanager
def acquire_table_lock(read, write):
'''Acquire read & write locks on tables.