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
#!/bin/sh | |
set -e | |
PREFIX=/usr/local | |
SRC=$PREFIX/src | |
VIMDIR=$SRC/vim | |
PROC=`nproc` | |
CONFIGURE_OPTIONS="--prefix=$PREFIX --with-features=huge --enable-fail-if-missing \ | |
--enable-perlinterp --enable-pythoninterp --enable-python3interp --enable-luainterp --enable-terminal" |
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
/home/utgw/reimuchan/vendor/bundle/ruby/2.3.0/gems/eventmachine-1.0.9.1/lib/eventmachine.rb:202: [BUG] Segmentation fault at 0x00000000000000 | |
ruby 2.3.0p0 (2015-12-25 revision 53290) [x86_64-linux] | |
-- Control frame information ----------------------------------------------- | |
c:0007 p:---- s:0033 e:000032 CFUNC :release_machine | |
c:0006 p:0038 s:0030 e:000029 RESCUE /home/utgw/reimuchan/vendor/bundle/ruby/2.3.0/gems/eventmachine-1.0.9.1/lib/eventmachine.rb:202 | |
c:0005 p:0432 s:0027 e:000026 METHOD /home/utgw/reimuchan/vendor/bundle/ruby/2.3.0/gems/eventmachine-1.0.9.1/lib/eventmachine.rb:226 | |
c:0004 p:0074 s:0020 E:000228 METHOD /home/utgw/reimuchan/vendor/bundle/ruby/2.3.0/gems/tweetstream-2.6.1/lib/tweetstream/client.rb:403 | |
c:0003 p:0039 s:0014 e:000013 METHOD /home/utgw/reimuchan/vendor/bundle/ruby/2.3.0/gems/tweetstream-2.6.1/lib/tweetstream/client.rb:143 | |
c:0002 p:0465 s:0008 E:000ed0 EVAL reimuchan.rb:177 [FINISH] |
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 | |
import win32com.client | |
import webbrowser | |
from urllib.parse import quote | |
def get_itunes_client(): | |
return win32com.client.Dispatch("iTunes.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
# coding: shift-jis | |
import re | |
import string | |
from crypt import crypt | |
from base64 import b64encode | |
from hashlib import sha1 | |
def generate_trip(tripstr): | |
''' |
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
#!/usr/bin/python | |
# coding: utf-8 | |
# http://9lab.jp/works/dic/th-dic.php の Google 日本語入力向けの東方Project IME辞書を | |
# SKK用の辞書に変換するスクリプト | |
# Usage: | |
# python thdic2skk.py < thdic-r6-0-総合.txt > SKK-JISYO.touhou.utf8 | |
from __future__ import print_function | |
import sys | |
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 sys | |
from wsgiref.simple_server import make_server | |
def not_found(env): | |
request_path = env['PATH_INFO'] | |
status = '404 Not Found' | |
headers = [('Content-Type', 'text/plain; charset=utf-8')] | |
body = 'Not Found: {}'.format(request_path) |
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
% cat .zsh_history | cut -d";" -f2 | cut -d" " -f1 | sort | uniq -c | sort -nr | head -20 | |
420 git | |
299 vim | |
223 ls | |
198 cd | |
165 cat | |
154 python | |
141 sudo | |
129 rm | |
106 wget |
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 dig(dic, *keys): | |
keys = list(keys) | |
if isinstance(keys[0], list): | |
return dig(dic, *keys[0]) | |
if isinstance(dic, dict) and keys[0] in dic or \ | |
isinstance(dic, list) and keys[0] < len(dic): | |
if len(keys) == 1: | |
return dic[keys[0]] | |
return dig(dic[keys[0]], *keys[1:]) | |
return None |