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
(defun using-azerty? () | |
(condition-case nil | |
(let ((buffer (get-buffer-create "*using-azerty?*")) | |
return) | |
(set-buffer buffer) | |
(erase-buffer) | |
(call-process-shell-command "setxkbmap" nil buffer nil "-print") | |
(goto-char (point-min)) | |
(setq return (search-forward "azerty" nil t)) | |
(kill-buffer buffer) |
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
diff --git a/AppKit/CPWindow/CPWindow.j b/AppKit/CPWindow/CPWindow.j | |
index fc82ea3..86b1f58 100644 | |
--- a/AppKit/CPWindow/CPWindow.j | |
+++ b/AppKit/CPWindow/CPWindow.j | |
@@ -176,6 +176,7 @@ CPWindowWillCloseNotification = @"CPWindowWillCloseNotification"; | |
CPWindowDidBecomeMainNotification = @"CPWindowDidBecomeMainNotification"; | |
CPWindowDidResignMainNotification = @"CPWindowDidResignMainNotification"; | |
CPWindowDidMoveNotification = @"CPWindowDidMoveNotification"; | |
+CPWindowDidResizeNotification = @"CPWindowDidResizeNotification"; | |
CPWindowWillBeginSheetNotification = @"CPWindowWillBeginSheetNotification"; |
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
diff -r 66c307b0b7f9 docs/source/erlang_in_practice.rst | |
--- a/docs/source/erlang_in_practice.rst Tue Dec 01 01:41:06 2009 +0900 | |
+++ b/docs/source/erlang_in_practice.rst Wed May 12 14:54:24 2010 +0900 | |
@@ -22,7 +22,7 @@ | |
- loop から始まるプロセスを常時起動しているコードを書く | |
- loop を拡張していき、なんかしらのアプリを書いてみる | |
-上記3つについて具体的にどのような内容で勉強をす滑るべきなのかを解説していきます。 | |
+上記3つについて具体的にどのような内容で勉強をするべきなのかを解説していきます。 |
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
function! Workon(name) | |
" Get virtualenv's site-packages directory. | |
let b:virtualenv_sitepackages_dir = system('workon ' . a:name . '; cdsitepackages; echo -n $PWD') | |
python << EOM | |
import vim | |
import sys | |
virtualenv_sitepackages_dir = vim.eval('b:virtualenv_sitepackages_dir') | |
if virtualenv_sitepackages_dir not in sys.path: |
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 os | |
import time | |
import socket | |
import xmlrpclib | |
import subprocess | |
here = os.path.dirname(os.path.abspath(__file__)) | |
target = os.path.join(here, 'server.py') | |
gateway = None |
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
# -*- coding:utf-8 -*- | |
from datetime import date | |
class YearMonth(object): | |
""" List year/month from specified to today """ | |
def __init__(self, year, month, format='%Y/%m'): | |
self.year = year | |
self.month = month | |
self.format = format |
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
nnoremap <expr> / ':<C-u>Unite -start-insert -buffer-name="search-' . buffer_number('%') . '" line<CR>' | |
nnoremap <expr> * ':<C-u>UniteWithCursorWord -buffer-name="search-' . buffer_number('%') . '" line<CR>' | |
nnoremap <expr> n ':<C-u>UniteResume -no-start-insert -buffer-name="search-' . buffer_number('%') . '"<CR>' |
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
#!/bin/sh # -x | |
function usage { | |
echo "Usage: $0 python_path virtualenv_path" | |
echo "Setup a virtalenv for Google Appengine." | |
echo "" | |
echo "python_path Path to the Python interpreter used to the virtualenv." | |
echo "virtualenv_path Path to the target virtualenv." | |
exit | |
} |
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 os | |
import subprocess | |
def kill_children_process(pid, force=False): | |
pid = int(pid) | |
for line in subprocess.check_output( | |
'/bin/ps -eo "ppid pid"', | |
shell=True).split('\n')[1:]: | |
line = line.strip() |
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
from __future__ import print_function | |
import os | |
import sys | |
import pygit2 | |
import coverage | |
def collect_addition(hunk): | |
result = [] |
OlderNewer