This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
//C.sublime-build | |
//A sublime build system configuration file for C. | |
//Run C program in xterm | |
{ | |
"cmd": ["gcc", "${file}", "-o", "${file_path}/${file_base_name}"], | |
"file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$", | |
"working_dir": "${file_path}", | |
"selector": "source.c", | |
"variants": |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for i in *.mp3;do | |
a=`mid3v2 -l "$i" |grep "^TIT2"` | |
b=`mid3v2 -l "$i" |grep "^TPE1"` | |
if [ ! -z "$a" ] && [ ! -z "$b" ]; then | |
c=`echo $a|awk -F "=" '{print $2}'` | |
d=`echo $b|awk -F "=" '{print $2}'` | |
mv "$i" "$d - $c.mp3" | |
echo "$i mv to $d - $c.mp3" | |
fi | |
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# check deb repo consistency | |
# by SJ Zhu | |
test() { | |
release=$1 | |
start=0 | |
while read line; do | |
if [[ "$line" = "SHA1:" ]]; then |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# check deb repo consistency | |
# by SJ Zhu | |
set -e | |
test() { | |
release=$1 | |
start=0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set nocompatible " be iMproved, required | |
filetype off " required | |
" set the runtime path to include Vundle and initialize | |
set rtp+=~/.vim/bundle/Vundle.vim | |
call vundle#begin() | |
" alternatively, pass a path where Vundle should install plugins | |
"call vundle#begin('~/some/path/here') | |
" let Vundle manage Vundle, required |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @author SJ Zhu | |
* @license GPL-3.0 | |
* @date 2015-11-19 | |
*/ | |
#include <sys/types.h> | |
#include <sys/wait.h> | |
#include <stdlib.h> | |
#include <stdio.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sep 26 22:16:05 mirrors kernel: [81670.133508] INFO: task kswapd0:103 blocked for more than 120 seconds. | |
Sep 26 22:16:05 mirrors kernel: [81670.133530] Tainted: G C 3.16.36-ustclugsigned+deb8u1 #1 | |
Sep 26 22:16:05 mirrors kernel: [81670.133544] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. | |
Sep 26 22:16:05 mirrors kernel: [81670.133560] kswapd0 D 0000000000000000 0 103 2 0x00000000 | |
Sep 26 22:16:05 mirrors kernel: [81670.133563] ffff880233cc15b0 0000000000000046 0000000000013400 ffff880233cc7fd8 | |
Sep 26 22:16:05 mirrors kernel: [81670.133565] 0000000000013400 ffff880233cc15b0 ffff880233cc15b0 ffff880233cc7810 | |
Sep 26 22:16:05 mirrors kernel: [81670.133567] ffff880234190ae8 ffff880234190b00 ffff880234190000 ffff8800142dc058 | |
Sep 26 22:16:05 mirrors kernel: [81670.133570] Call Trace: | |
Sep 26 22:16:05 mirrors kernel: [81670.133580] [<ffffffff81530a35>] ? rwsem_down_read_failed+0xf5/0x140 | |
Sep 26 22:16:05 mirrors kernel: [81670.133586] [<ffffffff811aa92 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
_old_virtual_rprompt=$le:rprompt | |
fn detect_venv [path]{ | |
p=[$path/.*/bin/activate $path/*/bin/activate] | |
if == 0 (count $p); then | |
fail "Can't find a virtual env in "$path | |
fi | |
put (path-abs (path-dir $p[0])/../) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# alias | |
fn ... { cd ../.. } | |
fn .... { cd ../../.. } | |
fn ls { e:ls --color=auto $@ } | |
fn l { ls -alh $@ } | |
fn grep { e:grep --color $@ } | |
fn mtr { e:mtr --curses $@ } | |
fn gst { git status $@ } | |
fn gc { git commit -v $@ } | |
fn gca { git commit -v -a $@ } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Vue.component('post-list', { | |
template: ` | |
<div>{{ posts }} </div> | |
<div class="post" v-for="post in posts" :key="post.date"> | |
<h2>{{ post.name }}</h2> | |
<div class="info">Date: {{ post.date }}</div> | |
</div> | |
`, | |
data: function() { | |
return { |
OlderNewer