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
@echo off | |
for /f "delims= tokens=1*" %%a in ('dir /b *.sdr') do ( | |
if not exist "%%~na.mobi" ( | |
if not exist "%%~na.azw*" ( | |
if not exist "%%~na.txt" ( | |
if not exist "%%~na.pdf" ( | |
rd /s/q %%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
@echo off | |
for /f "delims= tokens=1*" %%a in ('dir /b *.sdr') do ( | |
if not exist "%%~na.mobi" ( | |
if not exist "%%~na.azw*" ( | |
if not exist "%%~na.txt" ( | |
if not exist "%%~na.pdf" ( | |
rd /s/q %%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
#!/usr/bin/env bash | |
set -o errexit | |
cmd_type=$1 | |
do_top() { | |
top -b -n2 -p 1 | fgrep "Cpu(s)" | tail -1 | awk -F'id,' -v prefix="$prefix" '{ split($1, vs, ","); v=vs[length(vs)]; sub("%", "", v); printf "%s%.1f%%\n", prefix, 100 - v }' | |
} | |
do_who() { | |
who | awk '{print $1}' |
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
<p class='word'> {{word}}</p> | |
<p>{{word Audio}}</p> | |
<p class='sentence'>{{examples_en}}</p> | |
<hr id=answer> | |
<p class='definition'>{{explanation_cn}}</p> | |
<p class='sentence'>{{examples_cn}}</p> | |
<p class='info'>★ {{phonetic symbol}} / <a href='eudic://dict//{{word}}'>Eudic</a> / {{#how_to_mem_zhuji3000}}{{how_to_mem_zhuji3000}}{{/how_to_mem_zhuji3000}}{{^how_to_mem_zhuji3000}} {{how_to_mem_bzsdbdc}}{{/how_to_mem_zhuji3000}}</p> |
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 | |
echo "OPTIND starts at $OPTIND" | |
while getopts ":pq:" optname | |
do | |
case "$optname" in | |
"p") | |
echo "Option $optname is specified" | |
;; | |
"q") | |
echo "Option $optname has value $OPTARG" |
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
# Your keymap | |
# | |
# Atom keymaps work similarly to style sheets. Just as style sheets use | |
# selectors to apply styles to elements, Atom keymaps use selectors to associate | |
# keystrokes with events in specific contexts. Unlike style sheets however, | |
# each selector can only be declared once. | |
# | |
# You can create a new keybinding in this file by typing "key" and then hitting | |
# tab. | |
# |
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
#!/usr/bin/env bash | |
# Usage: mvvenv.sh oldpath newpath | |
oldpath=$(realpath $1) | |
newpath=$(realpath $2) | |
# binpath=$(find oldpath -type d -name bin) | |
# tmp=${binpath%/*} | |
# venvname=${tmp##*/} | |
venvname=${VIRTUAL_ENV##*/} | |
oldvenvpath=$oldpath/$venvname | |
newvenvpath=$newpath/$venvname |
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
map h gT | |
map l gt | |
map w gT | |
map e gt | |
unmap d | |
map d x | |
unmap ; | |
map ; : | |
set nohud | |
set nosmoothscroll |
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
#监控咸鱼商品.sh | |
#http://www.hi-pda.com/forum/viewthread.php?tid=1735219&extra=page%3D1 | |
#监控商品的具体型号,标题和顶楼内容中符合其中的一项就会提醒: | |
keyword='newifi' | |
#价格,低于将提醒 | |
pricelimit=81 | |
#输出到html文件 | |
alertfile=taobao.htm |
NewerOlder