Skip to content

Instantly share code, notes, and snippets.

View nguyenbathanh's full-sized avatar

Thanh Nguyen nguyenbathanh

View GitHub Profile
@nguyenbathanh
nguyenbathanh / install_ffmpeg_ubuntu.sh
Created September 25, 2015 02:45 — forked from xdamman/install_ffmpeg_ubuntu.sh
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
# install openjdk
sudo apt-get install openjdk-7-jdk
# download android sdk
wget http://dl.google.com/android/android-sdk_r24.2-linux.tgz
tar -xvf android-sdk_r24.2-linux.tgz
cd android-sdk-linux/tools
# install all sdk packages
@nguyenbathanh
nguyenbathanh / command.sh
Created April 6, 2016 03:35
Ionic serve - Error: watch ENOSPC fix
echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
@nguyenbathanh
nguyenbathanh / command.sh
Created April 6, 2016 03:39
Ubuntu replace string in multiple files
find ./ -type f -exec sed -i 's/string1/string2/g' {} \;
@nguyenbathanh
nguyenbathanh / command.sh
Created April 6, 2016 03:40
Ubuntu find string in multiple files
grep -rn -o -i "your_string" *
@nguyenbathanh
nguyenbathanh / command.sh
Created April 6, 2016 03:43
Ubuntu show package version
aptitude search <package> -F "%c %p %d %V"
@nguyenbathanh
nguyenbathanh / command.sh
Created April 6, 2016 06:56
Ubuntu start apache2 automatically
sudo update-rc.d -f apache2 enable
@nguyenbathanh
nguyenbathanh / command.sh
Created April 6, 2016 07:40
Ubuntu remove all RC packages command
dpkg -l | grep ^rc | cut -d ' ' -f3 | xargs sudo dpkg --purge
@nguyenbathanh
nguyenbathanh / command.sh
Created April 9, 2016 16:16
Remove Ubuntu's password requirement
%sudo ALL=(ALL) NOPASSWD: ALL

SIMPLE WEBRTC VIDEO CHAT USING PEERJS

Operating System Ubuntu 14.04 via Koding.com

Install node.js

sudo apt-get update
sudo apt-get install nodejs

Check node.js version