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
module XMonad.Util.KeysWithHelp | |
( h | |
, keysWithHelp | |
, keysWithHelp' | |
, defaultKeysWithHelp | |
, defaultKeysWithHelp' | |
) where | |
import XMonad | |
import XMonad.Actions.ShowText (defaultSTConfig, flashText) |
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 maybe(gen): | |
it = gen() | |
v = next(it) | |
try: | |
while v is not None: | |
v = it.send(v) | |
except StopIteration: | |
return v |
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
function zaw-src-httpstatus() { | |
candidates=( | |
"100 Continue" | |
"101 Switching Protocols" | |
"102 Processing" | |
"200 OK" | |
"201 Created" | |
"202 Accepted" | |
"203 Non-Authoritative Information" | |
"204 No Content" |
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 ( | |
"bytes" | |
"fmt" | |
"io" | |
"net" | |
"os" | |
"path" | |
"path/filepath" |
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
# try to use tornado as a web application framework on twisted | |
# http://twistedmatrix.com/pipermail/twisted-python/2011-January/023296.html | |
from concurrent.futures import Future | |
from twisted.internet import defer | |
def futureFromDeferred(deferred): | |
assert isinstance(deferred, defer.Deferred) | |
f = Future() |
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
{-# LANGUAGE FlexibleContexts #-} | |
module Common | |
( Result | |
, ResultPair | |
, Regex -- re-export | |
, match | |
, addResult | |
, emptyResult | |
, showResultPair | |
, main_ |
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
from concurrent import futures | |
from tornado import escape, gen, web | |
from tornado.wsgi import WSGIContainer | |
class WSGIHandler(web.RequestHandler): | |
thread_pool_size = 10 | |
def initialize(self, wsgi_application): | |
self.wsgi_application = wsgi_application |
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
--- nautilus-3.8.2/libnautilus-private/nautilus-search-directory.c.orig 2013-07-04 17:39:05.893879085 +0900 | |
+++ nautilus-3.8.2/libnautilus-private/nautilus-search-directory.c 2013-07-04 17:39:12.226879030 +0900 | |
@@ -171,7 +171,7 @@ | |
nautilus_search_engine_model_set_model (model_provider, search->details->base_model); | |
simple_provider = nautilus_search_engine_get_simple_provider (search->details->engine); | |
- g_object_set (simple_provider, "recursive", TRUE, NULL); | |
+ g_object_set (simple_provider, "recursive", FALSE, NULL); | |
reset_file_list (search); |
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
from monad import * |
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 functools | |
import types | |
class State(object): | |
def __init__(self, gen, args, kwargs): | |
self._gen = gen | |
self._args = args | |
self._kwargs = kwargs |