Skip to content

Instantly share code, notes, and snippets.

View ssh0's full-sized avatar

Shotaro Fujimoto ssh0

View GitHub Profile
#!/usr/bin/env python
# -*- coding:utf-8 -*-
#
# written by Shotaro Fujimoto, September
#
# NOTE: bug: This code doesn't run correctly when the browser hasn't run.
from gi.repository import Gtk
import os
import commands
#!/usr/bin/env python
# -*- coding:utf-8 -*-
#
# written by Shotaro Fujimoto, September 2014
logfile = '/home/shotaro/Dropbox/log.txt'
# choose the default browser by comment out
# or you can edit to any browser
browser = {'default':
#!/usr/bin/env python
# -*- coding:utf-8 -*-
#
# written by Shotaro Fujimoto, September 2014
# 参考: https://gist.github.com/evoL/1650115
from gi.repository import Gtk
import config
logfile = config.logfile
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ssh0
ssh0 / tk_wrapper.py
Created October 7, 2014 06:27
IPython_Notebook-like tkinter wrapper
#! /usr/bin/env python
# -*- coding:utf-8 -*-
#
# written by ssh0, October 2014.
__doc__ = '''IPython-like Tkinter wrapper class.
You can create Scalebar, Checkbutton, Radiobutton via simple interface.
usage example:
@ssh0
ssh0 / gtk_wrapper.py
Created October 8, 2014 15:09
IPython_Notebook-like Gtk wrapper
#! /usr/bin/env python
# -*- coding:utf-8 -*-
#
# written by ssh0, October 2014.
from __future__ import print_function
__doc__ = '''IPython-like Gtk wrapper class.
You can create Scalebar, Switch, ComboBox via simple interface.
spacing 18 $ ResizableTall 1 (3/100) (3/5) []
@ssh0
ssh0 / proxy_toggle.sh
Created November 12, 2014 09:50
proxy_toggle.sh: toggle setting for proxy
#!/bin/sh
HTTP_PROXY_HOST=www-proxy.waseda.jp
HTTP_PROXY_PORT=8080
HTTPS_PROXY_HOST=www-proxy.waseda.jp
HTTPS_PROXY_PORT=8080
shellrc=$HOME/.zshrc # .bashrc
if [ $# = 0 ]; then
@ssh0
ssh0 / radiko.py
Created November 13, 2014 05:25
radiko streaming app (wrriten in python)
# /usr/bin/env python
# -*- coding:utf-8 -*-
playerurl = "http://radiko.jp/player/swf/player_3.0.0.01.swf"
playerfile = "tmp.swf"
keyfile = "tmp.png"
import urllib
import urllib2
import base64