Skip to content

Instantly share code, notes, and snippets.

View qizhihere's full-sized avatar

littleqz qizhihere

  • WuHan, Hubei Province, China
View GitHub Profile
@qizhihere
qizhihere / lazy-evalution.js
Last active June 30, 2016 02:56
关山口,懒人网上评教
function evalute() {
window.confirm = function(){ return true; };
var selects = document.querySelectorAll('#tdList td input[type="radio"][dj="01"]');
for (var i = 0; i < selects.length; i++) {
selects[i].click();
}
document.getElementById('yjjy').value = 'ok';
document.getElementById('SUB').click();
}
@qizhihere
qizhihere / mov2gif
Last active August 29, 2015 14:23 — forked from artursapek/mov2gif
#!/bin/bash
# mov2giv in out width
# mov2gif video_file_in.mov gif_file_out.gif 300
tmp_dir=/tmp/frames_$(date +%s)
mkdir $tmp_dir
if [ -z "$3" ]
then
size=600
@qizhihere
qizhihere / gist:d10ab6d78fad41227d0e
Last active August 29, 2015 14:22 — forked from klovadis/gist:2549131
use optional args in node.js
// example function where arguments 2 and 3 are optional
function example( err, optionalA, optionalB, callback ) {
// retrieve arguments as array
var args = [];
for (var i = 0; i < arguments.length; i++) {
args.push(arguments[i]);
}
// first argument is the error object
@qizhihere
qizhihere / install-tmux
Last active August 29, 2015 14:19 — forked from rothgar/install-tmux
install tmux 1.9a on centos 6.5
# Install tmux on Centos release 6.5
# install deps
yum install gcc kernel-devel make ncurses-devel
# DOWNLOAD SOURCES FOR LIBEVENT AND MAKE AND INSTALL
curl -OL https://github.com/downloads/libevent/libevent/libevent-2.0.21-stable.tar.gz
tar -xvzf libevent-2.0.21-stable.tar.gz
cd libevent-2.0.21-stable
./configure --prefix=/usr/local