Skip to content

Instantly share code, notes, and snippets.

View shomah4a's full-sized avatar

shoma shomah4a

  • 11:29 (UTC +09:00)
View GitHub Profile
@shomah4a
shomah4a / test.py
Created April 14, 2012 01:56
python3 implicit __class__ variable
#-*- coding:utf-8 -*-
import traceback
class Base(object):
def test(self):
print('called')
@shomah4a
shomah4a / tmpl.cpp
Created April 27, 2012 05:05
なにこれたのしいきもい
#include <iostream>
template <typename T>
class Operator
{
public:
template <T left, T right>
@shomah4a
shomah4a / __init__.py.patch
Created May 18, 2012 00:05
themecore で読めないテーマがあったときに死んじゃう
diff -r 040c63f8dec8 src/sphinxjp/themecore/__init__.py
--- a/src/sphinxjp/themecore/__init__.py Sat Jul 09 23:25:39 2011 +0900
+++ b/src/sphinxjp/themecore/__init__.py Fri May 18 09:05:10 2012 +0900
@@ -24,7 +24,12 @@
theme_paths = []
for plugin in pkg_resources.iter_entry_points('sphinx_themes'):
- m = plugin.load()
+ try:
+ m = plugin.load()
@shomah4a
shomah4a / hgrepo.py
Created May 25, 2012 02:33
リポジトリいじってみる
#-*- coding:utf-8 -*-
import time
import datetime
from mercurial import localrepo, match, ui as uimod
def load_repository(path):
@shomah4a
shomah4a / composable.py
Created June 7, 2012 03:59
関数合成みたいな何か
#-*- coding:utf-8 -*-
u'''
関数合成みたいな何か
'''
class Composable(object):
u'''
合成可能
'''
@shomah4a
shomah4a / gist:3103186
Created July 13, 2012 06:39
url とか
Calling Convention についての stackoverflow
http://stackoverflow.com/questions/2535989/what-are-the-calling-conventions-for-unix-linux-system-calls-on-x86-64
int 2E/sysenter/syscall考察
http://www.marbacka.net/asm64/arkiv/int2e_sysenter_syscall.html
Introduction to UNIX assembly programming
http://asm.sourceforge.net/intro/hello.html
2012/06/08 第17回 IT基礎技術勉強会 メモ
@shomah4a
shomah4a / contextman.py
Created July 14, 2012 06:09
contextmanager のテスト
#-*- coding:utf-8 -*-
import contextlib
def gencon():
u'''
ふつうの contextmanager
'''
print 'enter'
@shomah4a
shomah4a / fabfile.py
Created August 11, 2012 07:10
fabric hello
#-*- coding:utf-8 -*-
import sys
import os
import subprocess
from fabric import api
api.env.hosts = ['hostname']
[buildout]
parts = env ipython sphinx nose pylint epydoc supervisor
develop = .
pkg-name = tornadotest
[env]
recipe = zc.recipe.egg
@shomah4a
shomah4a / aaa.org
Created August 29, 2012 07:16
systemtap のあれこれ