This file contains hidden or 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
| " process the link | |
| " | |
| echohl MatchParen | echo "process the link" | echohl None | |
| %s/\[\[\(.\{-}\)]\[\(.\{-}\)]]/`\2 <\1>`_ /g | |
| " process %IF{ ....}% MACRO afer the list | |
| %s/%IF{.\{-}}%//g | |
| echohl MatchParen | echo "process Headline" | echohl None | |
| %s/+++\zs[^ ]/ &/ | |
| " process the Headline ---+++ |
This file contains hidden or 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
| <html> | |
| <body> | |
| </body> | |
| <style> | |
| body { | |
| background-color: black; | |
| background-image: radial-gradient( | |
| rgba(0, 150, 0, 0.75), black 120% | |
| ); | |
| height: 100vh; |
This file contains hidden or 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
| def retry_call(func,*args): | |
| while True: | |
| try: | |
| return func(*args) | |
| except(OSError,IOError) as e: | |
| if e.errno = errno.EINTR: | |
| continue | |
| raise | |
This file contains hidden or 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
| func= execve |execve | |
| pid = fork() | |
| if not pid: | |
| try: | |
| if env is None: | |
| func(file,args) | |
| func(file,args,env) | |
| except: | |
| _exit(127) |
This file contains hidden or 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
| mkdir mp3 | |
| oIFS=$IFS | |
| IFS=$'\n' | |
| find -type f -iname "*.mp3" | while read -r i; do | |
| mv "$i" mp3/ | |
| done |
This file contains hidden or 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
| SLIDES := $(patsubst %.md,%.md.slides.pdf,$(wildcard *.md)) | |
| HANDOUTS := $(patsubst %.md,%.md.handout.pdf,$(wildcard *.md)) | |
| all : $(SLIDES) $(HANDOUTS) | |
| %.md.slides.pdf : %.md | |
| pandoc $^ -t beamer --slide-level 2 -o $@ | |
| %.md.handout.pdf : %.md | |
| pandoc $^ -t beamer --slide-level 2 -V handout -o $@ |
This file contains hidden or 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 substitute-path /srv/blackbird D:/tmp/blackbird | |
This file contains hidden or 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
| cmd="select content,group_name,nickname from chat_logs where date(create_time) = curdate() order by group_number,qq;" | |
| datafile="im_`date +%Y_%m_%d`.rst" | |
| #mysql -N -B --default-character-set=utf8 -u root -pdevtoolsqa -DIM -e "$cmd" >$datafile | |
| mysql -N --default-character-set=utf8 -u root -pdevtoolsqa -DIM -e "$cmd" >$datafile | |
| pandoc $datafile -t html| mutt -e "set content_type=text/html" -s "$datafile" xxxx@xx |
This file contains hidden or 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
| CREATE TABLE `chat_logs` ( | |
| `Id` int(11) NOT NULL AUTO_INCREMENT, | |
| `create_time` datetime DEFAULT NULL COMMENT '创建时间', | |
| `content` varchar(255) DEFAULT NULL COMMENT '聊天内容', | |
| `group_number` varchar(255) DEFAULT NULL, | |
| `group_name` varchar(255) DEFAULT NULL, | |
| `qq` varchar(255) DEFAULT NULL, | |
| `nickname` varchar(255) DEFAULT NULL, | |
| `mark` varchar(255) DEFAULT NULL, | |
| PRIMARY KEY (`Id`) |
This file contains hidden or 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
| cmd="select content,group_name,nickname from chat_logs where date(create_time) = curdate() order by group_number,qq;" | |
| datafile="im_`date +%Y_%m_%d`.rst" | |
| #mysql -N -B --default-character-set=utf8 -u root -pdevtoolsqa -DIM -e "$cmd" >$datafile | |
| mysql -N --default-character-set=utf8 -u root -pdevtoolsqa -DIM -e "$cmd" >$datafile | |
| pandoc $datafile -t html mutt -e "set content_type=text/html" -s "$datafile" XXX@XXx |
NewerOlder