This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"github.com/codegangsta/martini" | |
"github.com/martini-contrib/render" | |
) | |
func main() { | |
m := martini.Classic() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def _compose(f_t_u, f_u_r): | |
return lambda t: f_u_r(f_t_u(t)) | |
class Compose(object): | |
def __init__(self): | |
# :type: T -> U | |
self.func = lambda a: a | |
def __call__(self, val): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
##### Uncrustify config | |
# Objective-C | |
# ===== Preprocessor ===== | |
# via: http://qiita.com/items/dd7c5ffdff27451dae16 | |
# #if、#ifdef、#ifndef〜#else〜#endifブロック内のプロプロセッサをインデントするかどうか。{ ignore, add, remove, force } | |
pp_indent = add | |
# ソースコードのインデントレベルに合わせてインデントするかどうか。{ true, false } | |
pp_indent_at_level = true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Foundation | |
import Cocoa | |
let CORRECT_CASE = "波紋疾走" | |
let AN = "深仙脈" | |
let DO = "波紋" | |
let TROW = "疾走" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# found this from Armin R. on Twitter, what a beautiful gem ;) | |
import ctypes | |
from types import DictProxyType, MethodType | |
# figure out side of _Py_ssize_t | |
if hasattr(ctypes.pythonapi, 'Py_InitModule4_64'): | |
_Py_ssize_t = ctypes.c_int64 | |
else: | |
_Py_ssize_t = ctypes.c_int |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
from __future__ import (print_function, division, absolute_import, unicode_literals, ) | |
from operator import methodcaller | |
class Perhaps(object): | |
''' | |
>>> p = Perhaps('hoge huga foo') | |
>>> P = p.try_('replace', 'huga', 'muoo').try_('upper').apply(print) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
from __future__ import (print_function, division, absolute_import, unicode_literals, ) | |
class Monad(object): | |
def __init__(self, v): | |
self.value = v | |
def __repr__(self): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Responsive: yes */ | |
/* <system section="theme" selected="bordeaux"> */ | |
@import "/css/theme/bordeaux/bordeaux.css"; | |
/* </system> */ | |
/* elements {{{ */ | |
/* <system section="background" selected="490A3D"> */ | |
body{ | |
background-color: #2dadac; | |
color: #fff6d3; |