Skip to content

Instantly share code, notes, and snippets.

@summivox
summivox / thu-pingjiao.user.js
Created May 23, 2012 15:36
清华评教:默认选优秀
// ==UserScript==
// @name thu-pingjiao
// @namespace http://github.com/smilekzs
// @include http*://zhjw.cic.tsinghua.edu.cn/pj.xspj_cpryb.do*
// @version 0.2
// ==/UserScript==
injectScript=function(src){
var scriptEl;
scriptEl = document.createElement('script');
@summivox
summivox / autocurl.bat
Created September 22, 2012 13:48
do{curl} until succeed(i.e. return 0)
@:start
@echo attempt
@curl %*
@if errorlevel 1 goto start
@echo succeed
@:end
@summivox
summivox / thu-grid-fix.user.coffee
Created December 3, 2012 09:18
修复清华选课系统在chrome下不能正常显示表格的问题
`
// ==UserScript==
// @name thu-grid-fix
// @namespace http://github.com/smilekzs
// @version 0.1.1
// @description 修复清华选课系统在chrome下不能正常显示表格的问题
// @include http*://*.cic.tsinghua.edu.cn/*
// ==/UserScript==
`
for el in document.getElementsByClassName('active-templates-row')
`
// vim: nowrap
// Copyright (c) 2013, smilekzs. (MIT Licensed)
// ==UserScript==
// @name renren-markdown
// @namespace http://github.com/smilekzs
// @version 0.4.15
// @description write well-formatted blogs on renren.com with markdown
// @include *blog.renren.com/blog/*Blog*
// @include *blog.renren.com/*Entry*
@summivox
summivox / gist:4465589
Created January 6, 2013 06:13
my xiaonei-reformer settings
{"removeAds":true,"removePageTheme":false,"removeStarReminder":true,"removeFloatObject":true,"removeMouseCursor":true,"removeEnterCartoon":true,"removePendant":true,"removeBlogTheme":true,"removeBlogLinks":true,"removeBlogMusicPlayer":false,"removePagesMusicPlayer":false,"removeZhanMusicPlayer":false,"removeFriendList":false,"removeRadioPlayer":false,"homeGadgets":{"topNotice":false,"appList":false,"myApp":false,"recommendApp":true,"appState":false,"vipToolbox":false,"recommendGift":false,"footprint":false,"newFriends":false,"schoolBeauty":false,"sponsors":true,"publicPageAdmin":false,"groups":false,"birthday":false,"webFunction":false,"survey":true,"friendPhoto":true,"newStar":true,"contact":false,"hotSearch":true},"profileGadgets":{"album":false,"blog":false,"share":false,"gift":false,"fav":false,"theme":false,"introduceFriends":false,"activity":true,"lover":false,"specialFriends":false,"mutualFriends":false,"visitors":false,"pages":false,"friends":false,"invitation":false,"musicPlayer":false},"rejectReques
@summivox
summivox / renren-share-title.user.js
Created January 7, 2013 14:03
用Evernote Clipper的时候,总是要手工复制粘贴标题(否则就都是“人人网 - 分享日志”之类的,不方便查找管理)。用这个userscript就可以解决了(顺便在tab栏里也会醒目一些)
// ==UserScript==
// @name renren-share-title
// @namespace http://github.com/smilekzs
// @version 0.1.0
// @description add title to renren blog share page (for Evernote Clipper)
// @include *blog.renren.com/share*
// ==/UserScript==
document.title=document.querySelector('.title-article > strong').innerHTML+' from '+document.querySelector('.title-article a').innerHTML.match('(.*)的日志')[1];
@summivox
summivox / refactor.vim
Last active December 12, 2015 08:38
VIM mapping for quick replacing of keyword under cursor
" quick refactoring: replace keyword under cursor
" `<leader>s`: main mapping
" `<SID>R`: arbitrary local mapping
" stores original position into `s before action
function! My_refactor(prefix)
return ':' . a:prefix . '%s/\<' . @" . '\>//g'
endfunction
nnoremap <special> <expr> <SID>refactor My_refactor('')
nmap <special> <leader>s msyiw<SID>refactor<left><left>
# mock-up async for test in browser
readfile=(file, cb)->
setTimeout (->
console.log("readfile(#{file}) callback")
cb(null, file+'data')
), 500
parse=(data, cb)->
setTimeout (->
console.log("parse(#{data}) callback")
@summivox
summivox / version.reg
Created February 22, 2013 11:41
Remove "versions of this file" from Windows 7 shell context menu
Windows Registry Editor Version 5.00
[-HKEY_CLASSES_ROOT\AllFilesystemObjects\shellex\ContextMenuHandlers\{596AB062-B4D2-4215-9F74-E9109B0A8153}]
[-HKEY_CLASSES_ROOT\CLSID\{450D8FBA-AD25-11D0-98A8-0800361B1103}\shellex\ContextMenuHandlers\{596AB062-B4D2-4215-9F74-E9109B0A8153}]
[-HKEY_CLASSES_ROOT\Directory\shellex\ContextMenuHandlers\{596AB062-B4D2-4215-9F74-E9109B0A8153}]
[-HKEY_CLASSES_ROOT\Drive\shellex\ContextMenuHandlers\{596AB062-B4D2-4215-9F74-E9109B0A8153}]
@summivox
summivox / thucal2.android.md
Created March 4, 2013 11:41
THUCAL2, iCalendar EXDATE vs. Android Calendar

###请所有用Android + Google Calendar的童鞋在userscript.org升级到0.3.10版本,否则Android下日历不能正常显示~

链接在此:http://userscripts.org/scripts/show/159785


我是暴走的分割线