➜ 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
| // 断点代码特征:W.rU)(t.id | |
| window.ddd = W.rU // 断点后抽取函数 | |
| // 断点代码特征:me.WO)(O, | |
| window.uuu = me.WO // 断点后抽取函数 |
➜ 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
| // ==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/* |
| # Insert your preferred key mappings here. | |
| # 帮助, 默认键容易和网页现有快捷键冲突 | |
| map :? showHelp | |
| unmap ? | |
| # m键和 Confluence 评论快捷键冲突, mark + goto mark几乎用不到 | |
| unmap m | |
| unmap ` |
| 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' | |
| 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)-> | |
| " |
| # 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) |
| 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 |