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
| $ sudo apt-get -o DPkg::Options::="--force-confask" install --reinstall base-files |
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
| static void safe_print(const char *cp, int len) | |
| { | |
| unsigned char ch; | |
| if (len < 0) | |
| len = strlen(cp); | |
| while (len--) { | |
| ch = *cp++; | |
| if (ch > 128) { |
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
| $ sudo vi /etc/apt/preferences | |
| # Set Pin-Priority for "Pin: release o=Ubuntu" entry from 500 to 1001 | |
| $ sudo apt-get dist-upgrade | |
| $ sudo apt-get install ubuntu-desktop | |
| $ sudo apt-get remove `apt-show-versions -b | grep /lisa` | |
| $ sudo vi /etc/apt/preferences | |
| # Set Pin-Priority for "Pin: release o=Ubuntu" entry to 500, other entries to -1 | |
| $ sudo apt-get dist-upgrade | |
| $ sudo apt-get -o DPkg::Options::="--force-confask" install --reinstall base-files bash |
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
| >>> print re.sub(r'\\#(\d{3})', lambda m: chr(int(m.group(1), 8)), s).decode('utf-8') |
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
| 1. check free space by running "df -h" | |
| => under 50%, ok | |
| 2. unmount the volume | |
| 3. dumpe2fs -h /dev/VolGroup00/data | |
| Block count: 10483712 | |
| Reserved block count: 524069 | |
| Free blocks: 6391697 | |
| Free inodes: 2621196 |
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
| ;; https://gist.github.com/3176621 にインスパイアされて | |
| ;; 実際に CPS スタイルで非同期処理を行うコードを実装してみた | |
| ;; | |
| ;; $ gosh -V | |
| ;; Gauche scheme shell, version 0.9.3.2 [utf-8,pthreads], x86_64-apple-darwin11.4.2 | |
| ;; | |
| (use util.queue) | |
| ;; 非常に簡易なイベントキューの実装 |
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
| class A(object): | |
| fmt = "tweets %s" | |
| def hello(self): | |
| return "hello " + self.name | |
| @classmethod | |
| def tweets(cls, mes): | |
| return cls.fmt % mes | |
| def __init__(self, name): | |
| self.name = name |
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
| $ python3.2 party.py -v | |
| test_二次会 (__main__.Test参加者) ... skipped '' | |
| test_名刺交換 (__main__.Test参加者) ... ok | |
| test_自己紹介 (__main__.Test参加者) ... ok | |
| ---------------------------------------------------------------------- | |
| Ran 3 tests in 0.001s | |
| OK (skipped=1) |