This file contains 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
(游戏 Persona 2)片头文字引用自海涅的诗『Der Doppelgänger』远山一行译的日文版 | |
静けき夜 巷は眠る | |
この家に 我が恋人はかつて住み居たり | |
彼の人は この街すでに去りませど | |
そが家は いまもここに残りたり | |
一人の男そこに立ち 高きを見やり | |
手は大いなる苦悩と闘うと見ゆ |
This file contains 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
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | |
Version 2, December 2004 | |
Copyright (C) 2011 Mathieu 'p01' Henri <http://www.p01.org/releases/> | |
Everyone is permitted to copy and distribute verbatim or modified | |
copies of this license document, and changing it is allowed as long | |
as the name is changed. | |
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE |
This file contains 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/env ruby | |
# Play the flash video loading in your browser using a movie player | |
PLAYER = 'mplayer -zoom' # your favorite player | |
def get_flash_file_path | |
pat = %r(^.*?(\d+).*?(\d+).*$) | |
`lsof /tmp | grep Flash` =~ pat | |
pid, fd = $~[1], $~[2] | |
"/proc/#{pid}/fd/#{fd}" |
This file contains 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/env ruby | |
def convert_hexstr(str, start=0, index=nil) | |
index ||= str.length | |
hexstr = str[start, index] | |
ar = [] | |
hexstr.scan(/\\x../).each do |s| | |
ar << s.gsub('\\', '0').to_i(16) | |
end | |
ar.empty? ? str : ar.pack('C*').force_encoding('utf-8') |
This file contains 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
"""If we're working with a Django project, set up the environment | |
""" | |
import os | |
def load_ipython_extension(ipython): | |
try: | |
import django | |
except ImportError: | |
return |
This file contains 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 argparse | |
import os | |
import sys | |
from PIL import Image | |
OUTPUT_DIR = 'output' | |
OUTPUT_SIZE = (3000, 1500) | |
This file contains 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 math | |
EARTH_RADIUS = 6378137. # in meters | |
def calculate_distance(lat1, lng1, lat2, lng2): | |
if not all((lat1, lng1, lat2, lng2)): | |
return | |
a = math.radians(lat1) - math.radians(lat2) |
This file contains 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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyL | |
ist-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>Disabled</key> | |
<true/> | |
<key>KeepAlive</key> | |
<dict> | |
<key>SuccessfulExit</key> |
This file contains 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
request = require "request" | |
url = require 'url' | |
fs = require 'fs' | |
path = require 'path' | |
crypto = require 'crypto' | |
UPYUN_API_HOSTS = | |
AUTO: "v0.api.upyun.com" | |
TELECOM: "v1.api.upyun.com" | |
NETCOM: "v2.api.upyun.com" |
This file contains 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
" copy all this into a vim buffer, save it, then... | |
" source the file by typing :so % | |
" Now the vim buffer acts like a specialized application for mastering vim | |
" There are two queues, Study and Known. Depending how confident you feel | |
" about the item you are currently learning, you can move it down several | |
" positions, all the way to the end of the Study queue, or to the Known | |
" queue. | |
" type ,, (that's comma comma) |
OlderNewer