Skip to content

Instantly share code, notes, and snippets.

kyuucr /
Last active Dec 15, 2015
This is an Ubuntu Unity Indicator to track your Dorm internet usage in NTUST. Added manual update quota, changed html parser. Written on Python 2.7
#!/usr/bin/env python
# -*- coding: utf8 -*-
import appindicator
import bs4
import datetime
import glib
import gtk
import logging
import pynotify
kyuucr / gist:2667195
Created May 12, 2012
Android - Hide context menu on certain ListView item.
View gist:2667195
public class ExampleActivity extends ListActivity {
public void onCreate(Bundle savedInstanceState) {
kyuucr / gist:2658573
Created May 11, 2012
Android - Finish activity with result
View gist:2658573
Intent data = new Intent();
if (getParent() == null) {
setResult(Activity.RESULT_OK, data);
} else {
getParent().setResult(Activity.RESULT_OK, data);
You can’t perform that action at this time.