This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Program: | |
# this program help us to find something in files'content. | |
# History: | |
# 05/11/2013 Joest First release | |
# | |
# usage: | |
# copye it to /usr/bin/ folder | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// | |
// @name query_bupt_library | |
// @description Search books which you see in douban on BUPT's Library | |
// @namespace http://bbs.byr.cn/ | |
// @author joest([email protected]) | |
// @license GNU GPL v3 (http://www.gnu.org/copyleft/gpl.html) | |
// @version 1.0 | |
// @include http://book.douban.com/subject/* | |
// |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// | |
// @name xiami_music_download | |
// @description download free music from xiami | |
// @namespace http://www.xiami.com/ | |
// @author joest([email protected]) | |
// @license GNU GPL v3 (http://www.gnu.org/copyleft/gpl.html) | |
// @version 1.0 | |
// @include http://www.xiami.com/search* | |
// |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// | |
// @name byr_bt | |
// @description Search movies on bt which you see in douban | |
// @namespace http://bt.byr.cn/ | |
// @author joest([email protected]) | |
// @license GNU GPL v3 (http://www.gnu.org/copyleft/gpl.html) | |
// @version 1.0 | |
// @include http://movie.douban.com/subject/* | |
// |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(document).ready(function(){ | |
var $backToTopTxt = "返回顶部" | |
var $backToTopEle = $('<div class="backToTop"></div>').appendTo($(".site")) | |
.text($backToTopTxt).attr("title", $backToTopTxt).click( | |
function() { | |
$("html, body").animate({ scrollTop: 0 }, 120); | |
}), | |
$backToTopFun = function() { | |
var st = $(document).scrollTop(), winh = $(window).height(); | |
(st > 500)? $backToTopEle.show(): $backToTopEle.hide(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void exch(int &a, int &b) | |
{ | |
int temp = a; | |
a = b; | |
b = temp; | |
} | |
void exch(int *a, int *b) | |
{ | |
int temp = *a; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--Based on script found at: http://superuser.com/questions/14118/easiest-way-to-create-a-new-text-file-in-a-finder-window-on-osx | |
tell application "Finder" | |
--The following line is commented out since it is buggy in Lion. | |
--set p to insertion location | |
try | |
set p to folder of window 1 | |
on error | |
set p to desktop | |
end try | |
set f to make new file at p |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
__author__ = 'mactalk' | |
import urllib, urllib2, HTMLParser | |
#文章列表 | |
article_list = [] | |
#Instapaper 的用户名和密码 | |
username = "[email protected]" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def last_zero_num(n): | |
count = 0 | |
while n: | |
count += n / 5 | |
n = n / 5 | |
return count |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Source config file | |
# should contains follows variables: | |
# AUTH_TOKEN | |
# ROOM_ID | |
source config.sh | |
my_func() { | |
return 1 |
OlderNewer