Skip to content

Instantly share code, notes, and snippets.

@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 / 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 / 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 / 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 / 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 / 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=""