Skip to content

Instantly share code, notes, and snippets.

View zhaiduo's full-sized avatar
💭
hello world

Adam zhaiduo

💭
hello world
View GitHub Profile
@zhaiduo
zhaiduo / .gemrc
Created September 23, 2021 16:14 — forked from jch/.gemrc
gemrc example
# http://docs.rubygems.org/read/chapter/11
---
gem: --no-ri --no-rdoc
benchmark: false
verbose: true
update_sources: true
sources:
- http://gems.rubyforge.org/
- http://rubygems.org/
backtrace: true
@zhaiduo
zhaiduo / GoPro RTMP streaming with FFmpeg
Created September 12, 2021 15:35 — forked from laurieainley/GoPro RTMP streaming with FFmpeg
Live streaming from a GoPro Hero3 camera to RTMP server using FFmpeg
Basic Requirements:
Computer with wired and wireless connection
FFmpeg installation: http://www.ffmpeg.org/
GoPro Hero 3+: http://gopro.com/
RTMP server e.g. FMS (http://www.adobe.com/products/adobe-media-server-family.html) or CDN ingest point
Overview:
GoPro Hero3 cameras produce HLS streams which are consumed by control apps and their removeable monitor.
@zhaiduo
zhaiduo / RTMP to M3U8
Last active September 8, 2021 01:46 — forked from RupGautam/RTMP to M3U8
RTMP to M3U8
ffmpeg -re -i "rtmp://example.com/path/file live=1" -hls_time 10 -hls_wrap 7 -hls_list_size 3 -f hls play.m3u8
ffmpeg multiple rtsp cameras into sigle stream to youtube
ffmpeg
-i "rtsp://xxxxxx:xxxxxx@192.168.1.164/live2.sdp"
-i "rtsp://xxxxxx:xxxxxx@192.168.1.164/live2.sdp"
-f lavfi -i anullsrc
-filter_complex "
[0:v] setpts=PTS-STARTPTS,scale=800x448,setsar=1[upperleft];
[1:v] setpts=PTS-STARTPTS, scale=800x448,setsar=1[upperright];
@zhaiduo
zhaiduo / build.sh
Created January 30, 2019 01:12 — forked from c0ming/build.sh
A script for build iOS7 universal static library with clang
#!/bin/bash
# e.g. libmms http://sourceforge.net/projects/libmms/
# set -x
BUILD_DIR=`pwd`"/build"
STATIC_LIB_NAME="libmms.a"
STATIC_LIB_NAME_ARM="libmms.a.arm"
STATIC_LIB_NAME_X86="libmms.a.x86"
@zhaiduo
zhaiduo / building-COLLADA2GLTF-MacOS-High-Sierra.md
Created October 20, 2018 07:46 — forked from TimvanScherpenzeel/building-COLLADA2GLTF-MacOS-High-Sierra.md
Building instructions for COLLADA2GLTF for MacOS High Sierra Version 10.13.4
# Tested on MacOS High Sierra Version 10.13.4

# Clone Git repo
git clone git@github.com:KhronosGroup/COLLADA2GLTF.git

cd COLLADA2GLTF

# Apple LLVM version 9.1.0 (clang-902.0.39.1) doesn't include 
@zhaiduo
zhaiduo / codesign_gdb.md
Created September 8, 2018 08:09 — forked from gravitylow/codesign_gdb.md
Codesign gdb on macOS

If you are getting this in gdb on macOS while trying to run a program:

Unable to find Mach task port for process-id 57573: (os/kern) failure (0x5).
 (please check gdb is codesigned - see taskgated(8))
  1. Open Keychain Access
  2. In menu, open Keychain Access > Certificate Assistant > Create a certificate
  3. Give it a name (e.g. gdbc)
@zhaiduo
zhaiduo / index.html
Created May 25, 2018 03:39 — forked from fcingolani/index.html
How to render a full PDF using Mozilla's pdf.js
<html>
<body>
<!-- really dirty! this is just a test drive ;) -->
<script type="text/javascript" src="https://raw.github.com/mozilla/pdf.js/gh-pages/build/pdf.js"></script>
<script type="text/javascript">
function renderPDF(url, canvasContainer, options) {
var options = options || { scale: 1 };

Gitlab Permission denied (publickey) error SOLVED

Permission denied (publickey)

Seems a very common error in Gitlab.com or any Gitlab implementation. Last night I spend 4/5 hours without sleeping to solve the error.

Cloning into 'server'...
Permission denied (publickey).
fatal: Could not read from remote repository.
@zhaiduo
zhaiduo / font-smoothing-on-high-dpi-media.css
Created May 8, 2018 15:28 — forked from dpschen/font-smoothing-on-high-dpi-media.css
Use more beautiful font smoothing on high dpi media devices
/* ---------------------------------------------------------- */
/* */
/* A media query that captures: */
/* */
/* - Retina iOS devices */
/* - Retina Macs running Safari */
/* - High DPI Windows PCs running IE 8 and above */
/* - Low DPI Windows PCs running IE, zoomed in */
/* - Low DPI Windows PCs and Macs running Firefox, zoomed in */
/* - Android hdpi devices and above */
@zhaiduo
zhaiduo / high-dpi-media.css
Created May 8, 2018 15:27 — forked from marcedwards/high-dpi-media.css
A CSS media query that captures almost all high DPI aware devices.
/* ---------------------------------------------------------- */
/* */
/* A media query that captures: */
/* */
/* - Retina iOS devices */
/* - Retina Macs running Safari */
/* - High DPI Windows PCs running IE 8 and above */
/* - Low DPI Windows PCs running IE, zoomed in */
/* - Low DPI Windows PCs and Macs running Firefox, zoomed in */
/* - Android hdpi devices and above */