Skip to content

Instantly share code, notes, and snippets.

View nguyenchilong's full-sized avatar

Long Nguyen nguyenchilong

  • Vietnam
  • 15:27 (UTC +07:00)
  • LinkedIn in/longnc
View GitHub Profile
@nguyenchilong
nguyenchilong / index.html
Created December 9, 2015 12:44 — forked from johnschimmel/index.html
Demo of loading Google Maps, fetching Markers with AJAX, Geocoding new location and POSTing new location with AJAX. http://dwd-nodejs-remoteapis.herokuapp.com/
<style>
/* IMPORTANT - must give map div height */
#map-canvas {
height:400px;
}
/* IMPORTANT - fixes webkit infoWindow rendering */
#map-canvas img {
max-width: none;
}
@nguyenchilong
nguyenchilong / demo.html
Created June 27, 2016 09:56 — forked from erikeldridge/demo.html
A simple YUI 3 module for adding Yahoo! login to a page
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<!-- Licensed under Yahoo! BSD license http://gist.github.com/375593 -->
</head>
<body>
<span id="login"></span>
@nguyenchilong
nguyenchilong / README.md
Created July 28, 2016 10:44 — forked from hofmannsven/README.md
My simply Git Cheatsheet
@nguyenchilong
nguyenchilong / Sublime Text 3 Build 3103 License Key - CRACK
Created August 10, 2016 09:17
Sublime Text 3 Build 3103 License Key - CRACK
I use the first
—– BEGIN LICENSE —–
Michael Barnes
Single User License
EA7E-821385
8A353C41 872A0D5C DF9B2950 AFF6F667
C458EA6D 8EA3C286 98D1D650 131A97AB
AA919AEC EF20E143 B361B1E7 4C8B7F04
[{"AddOnID":1,"AddOnPrice":4,"AddOnName":"Hawaiian Supreme-Cheesy Stuffed Crust-Regular","AddOnNameLabel":"Hawaiian Supreme-Cheesy Stuffed Crust +$4<br>-Regular","MenuID":"327","VariantID":"106","Toppings":[{"BomID":"13","ID":1,"Included":"Y","isIncluded":true,"Name":"SPICY CHICKEN"},{"BomID":"29","ID":1,"Included":"Y","isIncluded":true,"Name":"ONION"},{"BomID":"30","ID":1,"Included":"N","isIncluded":false,"Name":"PINEAPPLE"},{"BomID":"43","ID":1,"Included":"N","isIncluded":false,"Name":"PARSLEY"}],"ExtraCheese":"Cheese Added (+$1.00)"},{"AddOnID":2,"AddOnPrice":0,"AddOnName":"Country Pie","AddOnNameLabel":"Country Pie","MenuID":"207","VariantID":"383","Toppings":[]},{"AddOnID":3,"AddOnPrice":0,"AddOnName":"4pcs Chicken Tenders","AddOnNameLabel":"4pcs Chicken Tenders","MenuID":"159","VariantID":"388","Toppings":[]},{"AddOnID":4,"AddOnPrice":0,"AddOnName":"6pc Cinnamon Breadsticks","AddOnNameLabel":"6pc Cinnamon Breadsticks","MenuID":"233","VariantID":"389","Toppings":[]},{"AddOnID":5,"AddOnPrice":0,"AddOnName
#!/usr/bin/env node
'use strict';
var fs = require('fs');
var http = require('http');
var https = require('https');
var net = require('net');
var url = require('url');
var util = require('util');
@nguyenchilong
nguyenchilong / hash-short-php
Created August 20, 2017 18:15
method hash short very simply with 64 characters with php.
<?php
/**
* @uthor: Long Nguyen <nguyenchilong90@gmail.com>
* User: longnc
* Date: 7/30/17
* Time: 3:32 AM
*/
class Shortener {
@nguyenchilong
nguyenchilong / ffmpeg-watermark.md
Created October 22, 2017 22:19 — forked from bennylope/ffmpeg-watermark.md
FFmpeg add a watermark to video

How to Add a Watermark to Video

FFMPEG filters provide a powerful way to programmatically enhance or alter videos, and it’s fairly simple to add a watermark to a video using the overlay filter. The easiest way to install ffmpeg is to download a pre-built binary for your specific platform. Then you don’t have to worry about including and installing all the right dependencies and codecs you will be using.

Once you have ffmpeg installed, adding a watermark is as easy as passing your existing source through an overlay filter like so:

ffmpeg -i test.mp4 -i watermark.png -filter_complex "overlay=10:10" test1.mp4

Basically, we’re passing in the original video, and an overlay image as inputs, then passing it through the filter, and saving the output as test1.mp4.

@nguyenchilong
nguyenchilong / countries.sql
Created November 2, 2017 04:39 — forked from adhipg/countries.sql
Sql dump of all the Countries, Country Codes, Phone codes.
CREATE TABLE IF NOT EXISTS `country` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`iso` char(2) NOT NULL,
`name` varchar(80) NOT NULL,
`nicename` varchar(80) NOT NULL,
`iso3` char(3) DEFAULT NULL,
`numcode` smallint(6) DEFAULT NULL,
`phonecode` int(5) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
@nguyenchilong
nguyenchilong / gist:98edce0be1f6fc362d6afee0397db9c7
Created December 4, 2017 19:11 — forked from thachpham92/gist:d57b18cf02e3550acdb5
Tất cả các tham số trong WP_Query
// Source: https://gist.github.com/luetkemj/2023628
// Xem hướng dẫn WP_Query toàn tập: http://goo.gl/kRpzTz
<?php
$args = array(
//////Author Parameters - Tham số lấy bài viết theo tác giả
//http://codex.wordpress.org/Class_Reference/WP_Query#Author_Parameters
'author' => '1,2,3,', //(int) - Các ID tác giả cần lấy bài viết (thêm dấu - vào để loại trừ tác giả, ví dụ: -14, -20)
'author_name' => 'luetkemj', //(string) - Lấy bài viết dựa theo tên nick name của tác giả
'author__in' => array( 2, 6 ), //(array) - Lấy bài dựa theo ID của tác giả