あるいは、Nexus7上にDebian環境を構築するときのメモ。
だれかおしえてください。
- キーボードの配列変更(Dvorak配列 + Ctrl-CapsLock入れ替え)
- 画面幅が80文字に固定される
- スワップを有効にしたほうがいい?
let s:endpoint = 'http://services.gingersoftware.com/Ginger/correct/json/GingerTheText' | |
let s:apikey = '6ae0c3a0-afdc-4532-a810-82ded0054236' | |
function! s:ginger(text) | |
let res = webapi#json#decode(webapi#http#get(s:endpoint, { | |
\ 'lang': 'US', | |
\ 'clientVersion': '2.0', | |
\ 'apiKey': s:apikey, | |
\ 'text': a:text}).content) | |
let i = 0 | |
let correct = '' |
-server | |
-Xms2048m | |
-Xmx2048m | |
-XX:NewSize=512m | |
-XX:MaxNewSize=512m | |
-XX:PermSize=512m | |
-XX:MaxPermSize=512m | |
-XX:+UseParNewGC | |
-XX:ParallelGCThreads=4 | |
-XX:MaxTenuringThreshold=1 |
#!/usr/bin/env python | |
# I was frustrated that no matter what buffer setting I passed to communicate, | |
# I could not get stdout from my subprocess until the process had completed. | |
# I googled around and came up with this, which illustrates the problem and a | |
# solution. | |
# http://stackoverflow.com/questions/2804543/read-subprocess-stdout-line-by-line | |
# http://bugs.python.org/issue3907 | |
# http://docs.python.org/library/io.html |
#-*- coding: utf-8 -*- | |
import contextlib | |
from django.db import connection | |
@contextlib.contextmanager | |
def acquire_table_lock(read, write): | |
'''Acquire read & write locks on tables. |
# Something in lines of http://stackoverflow.com/questions/348630/how-can-i-download-all-emails-with-attachments-from-gmail | |
# Make sure you have IMAP enabled in your gmail settings. | |
# Right now it won't download same file name twice even if their contents are different. | |
import email | |
import getpass, imaplib | |
import os | |
import sys | |
detach_dir = '.' |