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
# check if job exists | |
curl -XGET 'http://jenkins/checkJobName?value=yourJobFolderName' --user user.name:YourAPIToken | |
# with folder plugin | |
curl -s -XPOST 'http://jenkins/job/FolderName/createItem?name=yourJobName' --data-binary @config.xml -H "Content-Type:text/xml" --user user.name:YourAPIToken | |
# without folder plugin | |
curl -s -XPOST 'http://jenkins/createItem?name=yourJobName' --data-binary @config.xml -H "Content-Type:text/xml" --user user.name:YourAPIToken | |
# create folder |
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
// lib to add: http://code.google.com/p/google-gson/downloads/detail?name=google-gson-2.2.2-release.zip&can=2&q= | |
// file Main.scala | |
package demo | |
import scala.collection.JavaConverters._ | |
import com.google.gson.Gson | |
import java.util.ArrayList | |
import java.lang.reflect.Type | |
import com.google.gson.reflect.TypeToken |
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
package main | |
import ( | |
"crypto/md5" | |
"encoding/binary" | |
"fmt" | |
"os" | |
"sync/atomic" | |
"time" | |
) |
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 simple_unicode_decode($str) { | |
$str=str_ireplace("u0001","?",$str); | |
$str=str_ireplace("u0002","?",$str); | |
$str=str_ireplace("u0003","?",$str); | |
$str=str_ireplace("u0004","?",$str); | |
$str=str_ireplace("u0005","?",$str); | |
$str=str_ireplace("u0006","?",$str); | |
$str=str_ireplace("u0007","•",$str); |
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
// from http://qt-project.org/wiki/HMAC-SHA1 | |
QString hmacSha1(QByteArray key, QByteArray baseString) | |
{ | |
int blockSize = 64; // HMAC-SHA-1 block size, defined in SHA-1 standard | |
if (key.length() > blockSize) { // if key is longer than block size (64), reduce key length with SHA-1 compression | |
key = QCryptographicHash::hash(key, QCryptographicHash::Sha1); | |
} | |
QByteArray innerPadding(blockSize, char(0x36)); // initialize inner padding with char "6" |
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 | |
#source: http://stackoverflow.com/questions/2934563/how-to-decode-unicode-escape-sequences-like-u00ed-to-proper-utf-8-encoded-char | |
function replace_unicode_escape_sequence($match) { | |
return mb_convert_encoding(pack('H*', $match[1]), 'UTF-8', 'UCS-2BE'); | |
} | |
function unicode_decode($str) { | |
return preg_replace_callback('/\\\\u([0-9a-f]{4})/i', 'replace_unicode_escape_sequence', $str); | |
} |
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
import javax.crypto.spec.SecretKeySpec | |
import javax.crypto.Mac | |
object A { | |
def main(args: Array[String]): Unit = { | |
val secret = new SecretKeySpec("the_secret".getBytes, "HmacSHA1") | |
val mac = Mac.getInstance("HmacSHA1") | |
mac.init(secret) | |
val result: Array[Byte] = mac.doFinal("foo".getBytes) | |
println(result.map(_.toString).mkString(",")) |