Skip to content

Instantly share code, notes, and snippets.

CR kyuucr

Block or report user

Report or block kyuucr

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@kyuucr
kyuucr / ntust-dormweb-indicator.py
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
View ntust-dormweb-indicator.py
#!/usr/bin/env python
# -*- coding: utf8 -*-
import appindicator
import bs4
import datetime
import glib
import gtk
import logging
import pynotify
@kyuucr
kyuucr / gist:2667195
Created May 12, 2012
Android - Hide context menu on certain ListView item.
View gist:2667195
public class ExampleActivity extends ListActivity {
[...]
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
[...]
@kyuucr
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);
}
finish();
You can’t perform that action at this time.