Skip to content

Instantly share code, notes, and snippets.

@holys
holys / randombg.py
Last active December 17, 2015 08:49
#!/usr/bin/python
# -*- coding: utf8 -*-
"""
randombg.py
by holys <[email protected]>
= simple description =
Simple script to change background pictures randomly and regularly
Require setting up your crontab:
@holys
holys / movie.txt
Last active December 16, 2015 20:59
简单地 粗暴地根据豆瓣电影评分来排序, 结果不可靠. 仅供参考. 文件有两份, 一份是movie.txt, 是广外视频上的电影, 另一份是tv.txt, 是广外视频上的电视剧, 分类也不是很准确, 勉强地用吧
9.5 陈奕迅演唱会1.30 http://202.116.194.117/G/影视频道/演唱会/陈奕迅演唱会1.30.rmvb
9.5 西城男孩爱就在这里伦敦演唱会 http://202.116.194.117/F/演唱会/其他/西城男孩爱就在这里伦敦演唱会.rmvb
9.5 英皇十周年演唱会 http://202.116.194.117/F/Mediafile/影视频道/演唱会/其他/英皇十周年演唱会.rmvb
9.5 肖申克的救赎.[中英双字.1024分辨率] http://202.116.194.117/G/影视频道/欧美/剧情/肖申克的救赎.[中英双字.1024分辨率].rmvb
9.5 [迈克尔杰克逊.-德国历史演唱会清晰版].Michael.Jackson.History.Concert.1997.TVrip.cd1 http://202.116.194.117/G/影视频道/演唱会/[迈克尔杰克逊.-德国历史演唱会清晰版].Michael.Jackson.History.Concert.1997.TVrip.cd1.avi
9.5 [电影天堂www.dygod.com]湖南卫视2009-2010跨年演唱会c http://202.116.194.117/G/影视频道/演唱会/[电影天堂www.dygod.com]湖南卫视2009-2010跨年演唱会c.rmvb
9.5 [电影天堂www.dygod.com]湖南卫视2009-2010跨年演唱会b(1) http://202.116.194.117/G/影视频道/演唱会/[电影天堂www.dygod.com]湖南卫视2009-2010跨年演唱会b(1).rmvb
9.5 [电影天堂www.dygod.com]湖南卫视2009-2010跨年演唱会a http://202.116.194.117/G/影视频道/演唱会/[电影天堂www.dygod.com]湖南卫视2009-2010跨年演唱会a.rmvb
9.5 [电影天堂www.dygod.com]2010台北最HIGH新年跨年晚会C http://202.116.194.117/G/影视频道/演唱会/[电影天堂www.dygod.com]2010台北最HIGH新年跨年晚会C.rmvb
9.5 [电影天堂www.dygod.com]2010台北最H
# test environment
server{
listen 80;
server_name example.com;
access_log /home/david/Gone/Work/zcms/logs/access_log;
error_log /home/david/Gone/Work/zcms/logs/error_log;
# root /home/david/Gone/Work/zcms/contents/viewer;
location / {
proxy_set_header HOST $host;
@holys
holys / interest.json
Created April 19, 2013 05:07
格式化json
{"my_tags":[],"html":"\n\n<div class=\"indentpop1 clearfix\">\n <form action=\"\/j\/subject\/1300802\/interest\" method=\"POST\" class=\"j a_interest_form movie-sns\"><div style=\"display:none;\"><input type=\"hidden\" name=\"ck\" value=\"Uw7q\"/></div>\n \n\n <div class=\"interest-form-hd\">\n <span class=\"gact rr\">\n <a href=\"javascript:;\"onclick=\"close_dialog()\">x<\/a>\n <\/span>\n <h2>添加收藏:修改<\/h2>\n <\/div>\n <div class=\"interest-status\" style=\"float:left;font-size:14px;margin-bottom:15px\">\n <label>\n <input type=\"radio\" value=\"wish\" name=\"interest\" checked\/>&nbsp;想看\n <\/label>&nbsp;&nbsp;\n <label>\n <input type=\"radio\" value=\"collect\" name=\"interest\" \/>&nbsp;看过\n <\/label>&nbsp;&nbsp;\n <\/div>\n\n <div class=\"interest-rating\">\n <sp
div.title {
display: none;
}
div.title_area.clearfix {
display: none;
}
dl.pic30.SW_fun {
display: none;
javascript:(function(){var s=document.createElement('script');s.setAttribute('src','http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.js');if(typeof jQuery=='undefined'){document.getElementsByTagName('head')[0].appendChild(s);}jQuery("td.edit select option[value=BN]").attr("selected","");})();
@holys
holys / solved.md
Last active May 30, 2020 13:36
解决smplayer 中文字幕乱码
  • 设置中文字体 如wqy-microhei
  • 选择中文编码 Simple Chinese (CP936)
## RPC
#允许rpc
enable-rpc=true
#允许所有来源, web界面跨域权限需要
rpc-allow-origin-all=true
#允许非外部访问
rpc-listen-all=true
#RPC端口, 仅当默认端口被占用时修改
#rpc-listen-port=6800
@holys
holys / gist:5187449
Last active December 15, 2015 02:29
squid
squid cache
// ==UserScript==
// @name GDUFS library helper
// @namespace http://library.gdufs.edu.cn
// @version 0.1.0
// @description Show the available books amount in GDUFS library.
// @match http://book.douban.com/*
// @match http://opac.gdufs.edu.cn:8118/apsm/recommend/recommend_nobor.jsp*
// @copyright 2012-2013, Link, hbc,cdh(later)
// @require http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.8.3.min.js
// @require http://isbn.jpn.org/js/isbn.js