ffmpeg -i "Apache Sqoop Tutorial Part 1.mp4" -c copy -bsf:v h264_mp4toannexb -f mpegts intermediate1.ts
ffmpeg -i "Apache Sqoop Tutorial Part 2.mp4" -c copy -bsf:v h264_mp4toannexb -f mpegts intermediate2.ts
ffmpeg -i "Apache Sqoop Tutorial Part 3.mp4" -c copy -bsf:v h264_mp4toannexb -f mpegts intermediate3.ts
ffmpeg -i "Apache Sqoop Tutorial Part 4.mp4" -c copy -bsf:v h264_mp4toannexb -f mpegts intermediate4.ts
ffmpeg -i "concat:intermediate1.ts|intermediate2.ts|intermediate3.ts|intermediate4.ts" -c copy -bsf:a aac_adtstoasc "Apache Sqoop Tutorial.mp4"
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
<?php | |
function checkIPClass($ip) { | |
$ipLong = ip2long($ip); | |
if ($ipLong == -1 || $ipLong === FALSE) { | |
return null; | |
} | |
$ipBinaryString = sprintf('%b', $ipLong); | |
$ipBinaryString = str_pad($ipBinaryString, 32, '0', STR_PAD_LEFT); | |
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
cat words.txt | sort | uniq -c | sort -k1,1nr | head -10 | |
/* | |
sort: 对单词进行排序 | |
uniq -c: 显示唯一的行,并在每行行首加上本行在文件中出现的次数 | |
sort -k1,1nr: 按照第一个字段,数值排序,且为逆序 | |
head -10: 取前10行数据 | |
*/ | |
cat filter.log | awk -F '[' '{print $4}' | awk -F ':' '{print $1}' | sort | uniq -c | sort -k1,1nr | head -10 |
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/sh | |
for host in drops.wooyun.org www.aqniu.com www.freebuf.com | |
do | |
/usr/bin/wget http://$host/feed -O /home/work/feeds/$host/feed_$(date "+%Y-%m-%d-%H_%M_%S").xml >> /home/work/feeds/$host/wget.log 2>&1 | |
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
private HashMap<String, Object> jsonToMap(String t) throws JSONException { | |
HashMap<String, Object> map = new HashMap<String, Object>(); | |
JSONObject jObj = new JSONObject(t); | |
Iterator<?> keys = jObj.keys(); | |
while (keys.hasNext()) { | |
String key = (String) keys.next(); | |
map.put(key, jObj.get(key)); | |
} | |
return map; | |
} |
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
object Test extends App { | |
val a = Array(10, 9, -1, 8, -2, -100, 1000).toBuffer | |
var first = true | |
val indexes = for (i <- 0 until a.length if first || a(i) >= 0) yield { | |
if (a(i) < 0) | |
first = false | |
i | |
} | |
for(j <- 0 until indexes.length) | |
a(j) = a(indexes(j)) |
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
var appFunc = { | |
getDistance: function (firstLon, firstLat, secondLon, secondLat) { | |
var radFirstLon = appFunc.rad(firstLon); | |
var radFirstLat = appFunc.rad(firstLat); | |
var radSecondLon = appFunc.rad(secondLon); | |
var radSecondLat = appFunc.rad(secondLat); | |
var latDiff = radFirstLat - radSecondLat; | |
var lonDiff = radFirstLon - radSecondLon; |
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
function deepCopy(p, c) { | |
c = c || {}; | |
for (var i in p) { | |
if (p.hasOwnProperty(i)) { | |
if (typeof p[i] === 'object') { | |
c[i] = Array.isArray(p[i]) ? [] : {}; | |
deepCopy(p[i], c[i]); | |
} else { | |
c[i] = p[i]; | |
} |
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
function extendCopy(p) { | |
var c = {}; | |
for (var i in p) { | |
c[i] = p[i]; | |
} | |
c.uber = p; | |
return c; | |
} |
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
function extend(Child, Parent) { | |
var p = Parent.prototype; | |
var c = Child.prototype; | |
for (var i in p) { | |
c[i] = p[i]; | |
} | |
c.uber = p; | |
} |
NewerOlder