Skip to content

Instantly share code, notes, and snippets.

View usami's full-sized avatar

Yu Usami usami

View GitHub Profile
git reset --soft HEAD~1
@usami
usami / pocket_download.sh
Created March 16, 2013 01:38
Download all entries in your Pocket (http://getpocket.com).
#!/bin/sh
# before running this script, run the following command
# wget --save-cookies cookies.txt --post-data 'feed_id=****ID****&password=****PASS****' http://getpocket.com/login_process/
i=1
while [ $i -le 60 ]
do
wget --load-cookies cookies.txt -p http://getpocket.com/unread/$i
(( i++ ))
#!/usr/bin/env python
from stemming.porter2 import stem
from math import sqrt
class Docsim:
def __init__(self):
self.x = {}
self.y = {}
self.xlen = 0
@usami
usami / contestapplet.conf
Created March 2, 2012 23:47
TopCoder ContestApplet Preferences File
#TopCoder ContestApplet Preferences File
#Wed Mar 30 21:59:01 JST 2011
com.topcoder.client.contestApplet.common.LocalPreferences.menufont=Arial
com.topcoder.client.contestApplet.common.LocalPreferences.menufontsize=12
com.topcoder.client.contestApplet.common.LocalPreferences.commonclasspath=/Users/yusmi/Dropbox/dev/tc_env/
com.topcoder.client.contestApplet.common.LocalPreferences.chatpanelback=-16777216
com.topcoder.client.contestApplet.common.LocalPreferences.chatfindhighlight=-8355712
com.topcoder.client.contestApplet.common.LocalPreferences.chatfindback=-16776961
com.topcoder.client.contestApplet.common.LocalPreferences.chatfont=Monospaced
com.topcoder.client.contestApplet.common.LocalPreferences.chatfontsize=12
#!/usr/bin/env python
#-*- coding: utf-8 -*-
"""
This is a script to organize your iTunes Music Library.
It moves all directories in the src directory to the destination directory (normally, the Automatically add to iTunes directory).
When they are put in the Automatically add to iTunes directory, iTunes adds them to the library automatically.
"""
import os, sys, shutil