Skip to content

Instantly share code, notes, and snippets.

View v5tech's full-sized avatar
🎯
Focusing

v5tech

🎯
Focusing
  • Xi'an China
  • 17:44 (UTC +08:00)
View GitHub Profile
@v5tech
v5tech / ffmpeg.md
Last active October 14, 2024 19:57
ffmpeg视频合并、格式转换、截图

使用ffmpeg合并MP4文件

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"
@v5tech
v5tech / 知乎日报API.md
Last active May 7, 2025 05:59
知乎日报API
@v5tech
v5tech / SwiftSingleton.swift.md
Last active August 29, 2015 14:02
Swift Singleton
@v5tech
v5tech / pm25.in.md
Created June 10, 2014 05:50
pm25.in网站正则表达式

抓取PM25.in网站数据正则表达式

http://www.pm25.in/xian

抓取正则表达式

/<div\s*?class\s*?=\"value\">(.*?)<\/div>.*?<div.*?class\s*?=\"caption\">(.*?)<\/div>/im
@v5tech
v5tech / Swift.md
Last active August 29, 2015 14:02
Swift Code 碎片整理

Swift Code 碎片整理

1. NSURLConnection

var url = NSURL(string: "http://www.stackoverflow.com")
var request = NSURLRequest(URL: url)

NSURLConnection.sendAsynchronousRequest(request, queue: NSOperationQueue(), completionHandler: {(response: NSURLResponse!, data: NSData!, error: NSError!) in
        println(NSString(data: data, encoding: NSUTF8StringEncoding))
@v5tech
v5tech / Sqoop-RDBMS-to-Hadoop.md
Last active May 25, 2020 17:44
Sqoop - Data transfer tool from RDBMS to Hadoop Box

TO IMPORT & EXPORT DATA FROM RDBMS (MYSQL,ORACLE, etc) INTO HDFS / HIVE / HBASE

Pre-requisite

Apache Hadoop

Apache Sqoop (compatible with Hadoop version)

Apache Hive (optional)

@v5tech
v5tech / hive-group.md
Last active August 29, 2015 14:02
Hive分组求最小值

#准备测试数据

cat /home/hadoop/hemers.txt 
2014050201      新街口
2014050202      新街口
2014050203      新街口
2014050204      鼓楼
2014050205      岔路口
2014050206 岔路口
@v5tech
v5tech / nginx.md
Last active August 29, 2015 14:02
Red Hat Nginx 启动 Script

Should work on RHEL, Fedora, CentOS. Tested on CentOS 5.

/etc/init.d/nginx

#!/bin/sh
#
# nginx - this script starts and stops the nginx daemon
#
# chkconfig:   - 85 15 
@v5tech
v5tech / 为CentOS配置yum源.md
Last active August 29, 2015 14:02
为CentOS配置yum源

为CentOS配置yum源

1. 首先备份/etc/yum.repos.d/CentOS-Base.repo

mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup

2. 添加源

@v5tech
v5tech / Hadoop权威指南气象数据.md
Created May 28, 2014 17:15
Hadoop权威指南气象数据

Hadoop权威指南气象数据

  • 新版气象数据

下载地址:

ftp://ftp3.ncdc.noaa.gov/pub/data/noaa/isd-lite/

ftp://ftp.ncdc.noaa.gov/pub/data/noaa/isd-lite/