Skip to content

Instantly share code, notes, and snippets.

View nguyenbathanh's full-sized avatar

Thanh Nguyen nguyenbathanh

View GitHub Profile

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

@nguyenbathanh
nguyenbathanh / diagram.html
Last active May 7, 2016 16:26
Ionic modal sample with remote
<ion-view title="Diagram" hide-back-button="true">
<ion-content class="diagram">
<div class="padding">
<div class="card">
<div class="item-diagram item-begin">
<div class="diagram-thumbnail"> <img src="img/diagram/img-step-1.png" alt=""> </div>
<div class="diagram-content">
<div class="arrow-verticle"></div>
<div class="shape-content"> Bắt đầu quy trình <br>đánh số hợp đồng </div>
</div>
<x:Envelope xmlns:x="http://schemas.xmlsoap.org/soap/envelope/" xmlns:das="https://adx.admicro.vn/api/dashboard.php">
<x:Header/>
<x:Body>
<das:adx_banner_list_paging_by_user>
<das:key>dsh)(@#$!@</das:key>
<das:partner>dashboard</das:partner>
<das:status>?</das:status>
<das:status2>?</das:status2>
<das:fromdate>?</das:fromdate>
<das:todate>?</das:todate>
@nguyenbathanh
nguyenbathanh / stream.py
Created May 15, 2016 15:11 — forked from my8bit/stream.py
How to save youtube live stream. Python script which allows to save video by sequences
#!/usr/bin/python
# # # # # # # # # # # # # # # # # # # #
# #
# Script was made by Dennis #
# http://stefansundin.com/blog/452 #
# http://pastebin.com/8cw9LHFg #
# #
# # # # # # # # # # # # # # # # # # # #
@nguyenbathanh
nguyenbathanh / OpenWithSublimeText3.bat
Created May 18, 2016 02:50 — forked from roundand/OpenWithSublimeText3.bat
Open folders and files with Sublime Text 3 from windows explorer context menu (tested in Windows 7)
@echo off
SET st3Path=C:\Program Files\Sublime Text 3\sublime_text.exe
rem add it for all file types
@reg add "HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text 3" /t REG_SZ /v "" /d "Open with Sublime Text 3" /f
@reg add "HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text 3" /t REG_EXPAND_SZ /v "Icon" /d "%st3Path%,0" /f
@reg add "HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text 3\command" /t REG_SZ /v "" /d "%st3Path% \"%%1\"" /f
rem add it for folders
@reg add "HKEY_CLASSES_ROOT\Folder\shell\Open with Sublime Text 3" /t REG_SZ /v "" /d "Open with Sublime Text 3" /f
@nguyenbathanh
nguyenbathanh / Preferences.sublime-settings
Last active April 24, 2017 02:36
My sublime settings
{
"theme": "Autumn.sublime-theme",
"drag_text": false,
"folder_exclude_patterns": [
".svn",
".git",
".hg",
"CVS",
"node_modules"
],
@nguyenbathanh
nguyenbathanh / style.css
Created June 14, 2016 02:55
Ionic slide menu <ion-side-menus> transition like ios
ion-side-menu-content {
transition: all 0.4s cubic-bezier(0.1, 0.7, 0.1, 1) 0s !important;
}
var test = 24,
arr = [76,56,22,89,74].sort(); // just sort it generally if not sure about input, not really time consuming
function getClosest(test, arr) {
var num = 0, result = 0;
var flag = 0;
for(var i = 0; i < arr.length; i++) {
num = arr[i];
if(num < test) {
result = num;
function downloadFile($url, $path)
{
$newfname = $path;
$file = fopen ($url, 'rb');
if ($file) {
$newf = fopen ($newfname, 'wb');
if ($newf) {
while(!feof($file)) {
fwrite($newf, fread($file, 1024 * 8), 1024 * 8);
}
"4001::<iframe id="IFRID1471405554283" src="//demo.admicro.vn/kydq/newformat/index.html"
adm-info="MzMzMzMzJTdDJTdDaHR0cCUzQS8vZGFudHJpLmNvbS52biU3Q2h0dHBzJTNBLy9kZW1vLmFkbWljcm8udm4va3lkcS9uZXdmb3JtYXQvaW1hZ2VzL2ltZy02NTAtNTAwLTEuanBn"
width="650" height="500" scrolling="no" allowfullscreen="true" frameborder="0" framespacing="0"></iframe
>^^abc**0||4002::hiiiiiiiii^^abc**0"