支持一个输入参数: ip地址文件列表
所有不是ip地址的行都会忽略,所以可以这样
1.2.3.4
my comment text
每个ip会ping5次,结果以平均响应时间从小到大排序,最快的在开头.
#!/bin/bash | |
export fan=$1 | |
export an=$2 | |
export ae=$3 | |
git filter-branch -f --commit-filter ' | |
if [ "$GIT_AUTHOR_NAME" = "$fan" ]; | |
then | |
GIT_COMMITTER_NAME="$an"; |
scrollFollow = (ele, opts)=> | |
ele = $ ele | |
range = $ opts.range | |
n = 0 | |
lastTop = $(window).scrollTop() - 1 | |
scrolling = -> | |
top = $(window).scrollTop() | |
viewHeight = $(window).height() | |
eleHeight = origEleHeight = ele.height() | |
eleHeight = viewHeight if eleHeight < viewHeight |
# coding: utf-8 | |
from __future__ import with_statement | |
import os, re | |
reName1 = re.compile(r'^\d+-\d+-\d+_[^\.]+\.markdown$') | |
reName1_1 = re.compile(r'^\d+-\d+-\d+_[^\.]+\.md$') | |
reName2 = re.compile(r'^\d+-\d+-\d+-[^\.]+\.markdown$') | |
reDate = re.compile(r'^date: ([\d\-]+) (\d+):(\d+)\n$', re.I) |
支持一个输入参数: ip地址文件列表
所有不是ip地址的行都会忽略,所以可以这样
1.2.3.4
my comment text
每个ip会ping5次,结果以平均响应时间从小到大排序,最快的在开头.
# coding: utf-8 | |
from __future__ import with_statement | |
import os, re | |
reName1 = re.compile(r'^\d+-\d+-\d+_[^\.]+\.markdown$') | |
reName1_1 = re.compile(r'^\d+-\d+-\d+_[^\.]+\.md$') | |
reName2 = re.compile(r'^\d+-\d+-\d+-[^\.]+\.markdown$') | |
reDate = re.compile(r'^date: ([\d\-]+) (\d+):(\d+)\n$', re.I) |
fs = require 'fs' | |
newname = (f, date, time)-> | |
c = fs.readFileSync f, | |
encoding: 'utf-8' | |
[skip, title] = c.match /^Title: ([^\r\n]+)$/m | |
content = c.replace /^Date: .*$/m, ($0)-> | |
" |
routes = | |
'192.168.0.0': '255.255.0.0' | |
Future = require 'fibers/future' | |
child_process = require 'child_process' | |
iconv = require 'iconv-lite' | |
Future.task -> | |
stdout = exec 'route print' | |
# Insert your preferred key mappings here. | |
# 帮助, 默认键容易和网页现有快捷键冲突 | |
map :? showHelp | |
unmap ? | |
# m键和 Confluence 评论快捷键冲突, mark + goto mark几乎用不到 | |
unmap m | |
unmap ` |
// ==UserScript== | |
// @name mtime2douban | |
// @namespace mtime2douban | |
// @version 0.1 | |
// @description try to take over the world! | |
// @author You | |
// @match http://my.mtime.com/*/seen | |
// @match http://my.mtime.com/*/wantSee | |
// @match https://search.douban.com/movie/subject_search* | |
// @match https://movie.douban.com/subject/* |
➜ ls | xargs -i echo mv {} {} | sed 's/.txt/.md/2g'
mv 0001.txt 0001.md
mv 0002.txt 0002.md
mv 0003.txt 0003.md
mv 0004.txt 0004.md
mv 0005.txt 0005.md