Skip to content

Instantly share code, notes, and snippets.

View zsmatrix62's full-sized avatar
🍊
I may be slow to respond.

Kyle zsmatrix62

🍊
I may be slow to respond.
  • SKXI
  • 03:36 (UTC +08:00)
View GitHub Profile
@zsmatrix62
zsmatrix62 / ffmpeg.md
Created May 28, 2018 15:31 — forked from v5tech/ffmpeg.md
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"
@zsmatrix62
zsmatrix62 / gist:3dc454e31a7379211781621d6829210d
Created November 22, 2019 10:26 — forked from tayvano/gist:6e2d456a9897f55025e25035478a3a50
complete list of ffmpeg flags / commands
Originall From: Posted 2015-05-29 http://ubwg.net/b/full-list-of-ffmpeg-flags-and-options
This is the complete list that’s outputted by ffmpeg when running ffmpeg -h full.
usage: ffmpeg [options] [[infile options] -i infile]… {[outfile options] outfile}…
Getting help:
-h — print basic options
-h long — print more options
-h full — print all options (including all format and codec specific options, very long)
@zsmatrix62
zsmatrix62 / cgo.md
Created October 11, 2020 12:35 — forked from zchee/cgo.md
cgo convert list

See also, http://libraryofalexandria.io/cgo/

Using Go cgo

cgo has a lot of trap.
but Not "C" pkg also directory in $GOROOT/src. IDE's(vim) Goto command not works.

So, Here collect materials.

@zsmatrix62
zsmatrix62 / podforceupdate.sh
Created October 18, 2020 16:29 — forked from mbinna/podforceupdate.sh
Clear CocoaPods cache, re-download and re-install all pods
#!/usr/bin/env bash
rm -rf "${HOME}/Library/Caches/CocoaPods"
rm -rf "`pwd`/Pods/"
pod update
@zsmatrix62
zsmatrix62 / ImageDarkness.swift
Created December 17, 2020 22:01 — forked from adamcichy/ImageDarkness.swift
Determine if a UIImage is generally dark or generally light in Swift 3
extension CGImage {
var isDark: Bool {
get {
guard let imageData = self.dataProvider?.data else { return false }
guard let ptr = CFDataGetBytePtr(imageData) else { return false }
let length = CFDataGetLength(imageData)
let threshold = Int(Double(self.width * self.height) * 0.45)
var darkPixels = 0
for i in stride(from: 0, to: length, by: 4) {
let r = ptr[i]
@zsmatrix62
zsmatrix62 / WebCacheCleaner.swift
Created August 17, 2021 14:13 — forked from insidegui/WebCacheCleaner.swift
Clear WKWebView's cookies and website data storage, very useful during development.
import Foundation
import WebKit
final class WebCacheCleaner {
class func clean() {
HTTPCookieStorage.shared.removeCookies(since: Date.distantPast)
print("[WebCacheCleaner] All cookies deleted")
WKWebsiteDataStore.default().fetchDataRecords(ofTypes: WKWebsiteDataStore.allWebsiteDataTypes()) { records in
@zsmatrix62
zsmatrix62 / .vimrc
Created February 17, 2022 13:32 — forked from kirstein/.vimrc
Vimrc
call pathogen#infect()
"" Remap leader
let mapleader = ","
"" Remat jj to esc
inoremap jj <ESC>
"" Use Vim settings, rather then Vi settings (much better!).
"" This must be first, because it changes other options as a side effect.
@zsmatrix62
zsmatrix62 / tmux-cheatsheet.markdown
Created February 17, 2022 18:30 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@zsmatrix62
zsmatrix62 / BookmarkHub
Last active January 17, 2024 02:46 — forked from andreyvit/tmux.md
BookmarkHub
{"browser":"Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Mobile Safari/537.36","version":"0.0.4","createDate":1705459571536,"bookmarks":[{"children":[],"title":"MobileFolder"}]}
@zsmatrix62
zsmatrix62 / nerd_fonts.sh
Created September 29, 2022 08:58 — forked from davidteren/nerd_fonts.md
Install Nerd Fonts via Homebrew [updated & fixed]
# Nerd Fonts for your IDE
# https://www.nerdfonts.com/font-downloads
brew tap homebrew/cask-fonts && brew install --cask font-3270-nerd-font
brew tap homebrew/cask-fonts && brew install --cask font-fira-mono-nerd-font
brew tap homebrew/cask-fonts && brew install --cask font-inconsolata-go-nerd-font
brew tap homebrew/cask-fonts && brew install --cask font-inconsolata-lgc-nerd-font
brew tap homebrew/cask-fonts && brew install --cask font-inconsolata-nerd-font
brew tap homebrew/cask-fonts && brew install --cask font-monofur-nerd-font
brew tap homebrew/cask-fonts && brew install --cask font-overpass-nerd-font