Skip to content

Instantly share code, notes, and snippets.

@non117
non117 / get_ancestor_dir.py
Created September 28, 2012 08:38
先祖path
# -*- coding: utf-8 -*-
import os
def get_ancestor_dir(path, n):
'''
pathからn階層上のディレクトリを返す
path: ディレクトリの文字列. os.path.abspath(__file__)とかを想定.
n: 遡る階層の数
return: パスの文字列
'''
@non117
non117 / deleted.py
Created August 2, 2012 09:24
Boxnya plugin. mongodbと連携してTLのdeletedを通知するプラグイン.
# -*- coding: utf-8 -*-
from pymongo import Connection
from lib.core import Filter
class Deleted(Filter):
def init(self):
self.watch = [] # 監視対象のスクリーンネームを入れる. 空なら全部通知
addr = "localhost"
@non117
non117 / teiden.py
Created July 2, 2012 09:01
停電情報をpushするためのboxnyaプラグイン
# -*- coding: utf-8 -*-
import json
import urllib, urllib2
import time
from datetime import datetime
from lib.core import Input
class Teiden(Input):
def get_info(self):
俺の iPhone 4 (iOS 5.0.1) の JB 環境まとめ。とりあえず。
---
Sources
*Backspace Repos*
http://v.backspace.jp/repo/
*BigBoss*
http://apt.thebigboss.org/repofiles/cydia/dists/stable