Skip to content

Instantly share code, notes, and snippets.

View hohaidang's full-sized avatar
🏠
Working from home

Ho Hai Dang hohaidang

🏠
Working from home
View GitHub Profile
@pknowledge
pknowledge / opencv_python_object_detection.py
Created March 31, 2019 22:48
OpenCV Python Tutorial For Beginners - Object Detection and Object Tracking Using HSV Color Space
import cv2
import numpy as np
def nothing(x):
pass
cv2.namedWindow("Tracking")
cv2.createTrackbar("LH", "Tracking", 0, 255, nothing)
cv2.createTrackbar("LS", "Tracking", 0, 255, nothing)
cv2.createTrackbar("LV", "Tracking", 0, 255, nothing)
@nhathm
nhathm / SwiftClosure.swift
Created April 10, 2017 10:27
Swift Closure
//: Playground - noun: a place where people can play
// nhathm01247@gmail.com
import Foundation
/** DECLARE A CLOSURE **/
// Declare a variable to hold a closure
var add: (Int, Int) -> Int
@nhathm
nhathm / SwiftFunction.swift
Last active November 26, 2019 06:55
Swift Function
//: Playground - noun: a place where people can play
// nhathm01247@gmail.com
import UIKit
// Basic function declare
func sayHi() {
print("Hi")
}
sayHi()
@xdamman
xdamman / install_ffmpeg_ubuntu.sh
Created July 2, 2014 21:03
Install latest ffmpeg on ubuntu 12.04 or 14.04
#!/bin/bash
# Bash script to install latest version of ffmpeg and its dependencies on Ubuntu 12.04 or 14.04
# Inspired from https://gist.github.com/faleev/3435377
# Remove any existing packages:
sudo apt-get -y remove ffmpeg x264 libav-tools libvpx-dev libx264-dev
# Get the dependencies (Ubuntu Server or headless users):
sudo apt-get update
@olasd
olasd / stream_to_youtube.sh
Created March 28, 2014 19:58
Stream video to youtube via ffmpeg
#! /bin/bash
#
# Diffusion youtube avec ffmpeg
# Configurer youtube avec une résolution 720p. La vidéo n'est pas scalée.
VBR="2500k" # Bitrate de la vidéo en sortie
FPS="30" # FPS de la vidéo en sortie
QUAL="medium" # Preset de qualité FFMPEG
YOUTUBE_URL="rtmp://a.rtmp.youtube.com/live2" # URL de base RTMP youtube