Skip to content

Instantly share code, notes, and snippets.

@acgotaku
acgotaku / cuetag.sh
Last active January 18, 2022 07:00
cuetag.sh - tag files based on cue/toc file information use mid3v2 version 2.4.0
#! /bin/sh
# cuetag.sh - tag files based on cue/toc file information
# uses cueprint output
# usage: cuetag.sh <cuefile|tocfile> [file]...
# dependencies:
# id3v2
CUEPRINT=cueprint
cue_file=""
@acgotaku
acgotaku / apev2toid3v2
Created November 8, 2013 15:42
convert apev2tag to id3v2 version 2.4dependencies:matag
#!/usr/bin/env python2
# convert apev2 tag to id3 v2.4 tag
import os
import sys
import locale
from optparse import OptionParser
import mutagen.id3
import mutagen.apev2
@acgotaku
acgotaku / gbunzip
Created January 21, 2014 03:35
unzip from GBK
#!/usr/bin/env python2
# -*- coding: utf-8 -*-
import os
import sys
import zipfile
print "Processing File " + sys.argv[1]
file=zipfile.ZipFile(sys.argv[1],"r");
@acgotaku
acgotaku / css3_animation
Created January 23, 2014 03:16
css3 animation
/* animation */
.a-bounce,.a-flip,.a-flash,.a-shake,.a-swing,.a-wobble,.a-ring {
-webkit-animation: 1s ease;
-moz-animation: 1s ease;
-ms-animation: 1s ease;
animation: 1s ease;
}
.a-fadein,.a-fadeinT,.a-fadeinR,.a-fadeinB,.a-fadeinL,.a-bouncein,.a-bounceinT,.a-bounceinR,.a-bounceinB,.a-bounceinL,.a-rotatein,.a-rotateinLT,.a-rotateinLB,.a-rotateinRT,.a-rotateinRB,.a-flipin,.a-flipinX,.a-flipinY {
-webkit-animation: 1s ease-out backwards;
@acgotaku
acgotaku / base.py
Created February 17, 2014 01:37
a simple tornado start frame.
#!/usr/bin/env python2
import os
import logging
import tornado.options
import tornado.web
from tornado.options import define, options
define("bind", default="127.0.0.1", help="addrs that debugger bind to")
define("port", default=8888, help="run on the given port")
@acgotaku
acgotaku / xf_clear
Created May 14, 2014 09:27
clear xf resource limited.
EventHandler.check_dirty_words = function(str, has_dirty_func, no_dirty_func) {
jQuery.ajax({
url: '/handler/lixian/check_dirty_words.php',
dataType: 'json',
type: 'post',
data: {
file_msg: str
},
success: function(data) {
if (data.is_dirty === 1) {
@acgotaku
acgotaku / baidu
Last active August 29, 2015 14:01
百度云盘导出aria2c下载
// ==UserScript==
// @name 百度网盘导出工具
// @author Mormts
// @description 一个方便吧百度网盘的文件导出的脚本。(Aria2rpc, Aria2, Wget, IDM)。
// @encoding utf-8
// @homepageURL https://userscripts.org/scripts/show/178301
// @updateURL https://userscripts.org/scripts/source/178301.meta.js
// @downloadURL https://userscripts.org/scripts/source/178301.user.js
// @include http://*n.baidu.com/s/*
// @include http://*n.baidu.com/disk/home*
@acgotaku
acgotaku / baidupan
Last active April 26, 2023 04:00
新版百度云盘aria2c导出下载 ,目前只实现了核心功能.
// ==UserScript==
// @name 百度网盘aria2导出工具
// @author acgotaku311
// @description 一个方便吧百度网盘的Aria2rpc导出的脚本。
// @encoding utf-8
// @include http://*n.baidu.com/s/*
// @include http://*n.baidu.com/disk/home*
// @include http://*n.baidu.com/share/link*
// @include https://*n.baidu.com/s/*
// @include https://*n.baidu.com/disk/home*
@acgotaku
acgotaku / promise
Created August 24, 2014 09:59
Promise example
chrome.tabs.onUpdated.addListener(function(tabId, changeInfo, tab) {
console.log(tab);
if (changeInfo.status === 'loading' && tab.url.indexOf("n.baidu.com") != -1) {
var site1 = "http://pan.baidu.com/";
var name1 = "BDUSS";
var site2 = "http://pcs.baidu.com/";
var name2 = "pcsett";
Promise.all([get_cookie(site1,name1), get_cookie(site2,name2)]).then(function(value){
console.log(value);
},function(){});
@acgotaku
acgotaku / instagram
Last active June 10, 2016 07:21
get instagram image 使用方法 : ./instagram http://instagram.com/mochio_munchkin
#!/usr/bin/env python2
# -*- encoding: utf-8 -*-
# vim: set et sw=4 ts=4 sts=4 ff=unix fenc=utf8:
import os.path
import sys
import json
import codecs
import httplib
from pyquery import PyQuery as pq
from urlparse import urlparse