Skip to content

Instantly share code, notes, and snippets.

Duy duyngha

Block or report user

Report or block duyngha

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View coutry_codes.json
[{"name":"Afghanistan","dial_code":"+93","code":"AF"},{"name":"Aland Islands","dial_code":"+358","code":"AX"},{"name":"Albania","dial_code":"+355","code":"AL"},{"name":"Algeria","dial_code":"+213","code":"DZ"},{"name":"AmericanSamoa","dial_code":"+1684","code":"AS"},{"name":"Andorra","dial_code":"+376","code":"AD"},{"name":"Angola","dial_code":"+244","code":"AO"},{"name":"Anguilla","dial_code":"+1264","code":"AI"},{"name":"Antarctica","dial_code":"+672","code":"AQ"},{"name":"Antigua and Barbuda","dial_code":"+1268","code":"AG"},{"name":"Argentina","dial_code":"+54","code":"AR"},{"name":"Armenia","dial_code":"+374","code":"AM"},{"name":"Aruba","dial_code":"+297","code":"AW"},{"name":"Australia","dial_code":"+61","code":"AU"},{"name":"Austria","dial_code":"+43","code":"AT"},{"name":"Azerbaijan","dial_code":"+994","code":"AZ"},{"name":"Bahamas","dial_code":"+1242","code":"BS"},{"name":"Bahrain","dial_code":"+973","code":"BH"},{"name":"Bangladesh","dial_code":"+880","code":"BD"},{"name":"Barbados","dial_code":"+1
View VS Code Setting
{
"extensions.ignoreRecommendations": false,
"prettier.useTabs": true,
"prettier.tabWidth": 4,
"prettier.singleQuote": true,
"prettier.semi": false,
"emmet.syntaxProfiles": {
"javascript": "jsx"
},
"emmet.includeLanguages": {
View countries.js
[
{ code: 213, name: 'Algeria (+213)' },
{ code: 376, name: 'Andorra (+376)' },
{ code: 244, name: 'Angola (+244)' },
{ code: 1264, name: 'Anguilla (+1264)' },
{ code: 1268, name: 'Antigua Barbuda (+1268)' },
{ code: 54, name: 'Argentina (+54)' },
{ code: 374, name: 'Armenia (+374)' },
{ code: 297, name: 'Aruba (+297)' },
{ code: 61, name: 'Australia (+61)' },
@duyngha
duyngha / fancybox_3.js
Created Sep 5, 2017
Binding a event to fancybox 3
View fancybox_3.js
var fakeCommentBtn = $('#fake_comment');
var fakeMessage = $('#fake_message');
fakeCommentBtn.click(function (e) {
var comment = preCommentArea.val();
if (comment == '') {
fakeMessage.text('Bạn chưa nhập nội dung bình luận.');
} else {
var commentForm = $('#commentform');
$.fancybox.open(
commentForm,
View filter.js
var filterSelect = $('.filter-control select');
filterSelect.change(function(){
var value = $(this).val();
var type = $(this).attr('data-type');
var key = $(this).attr('data-key');
var uri = new URI();
switch (type) {
case 'tax':
View snippets.txt
sudo ln -s /Applications/MAMP/tmp/mysql/mysql.sock /tmp/mysql.sock
@duyngha
duyngha / scripts.js
Created May 10, 2017
A helper script file
View scripts.js
// Hien thi popup tai vi tri hien tai cua con tro chuot
$('.product-column').mousemove(function(e){
var parentOffset = $(this).offset();
var relX = e.pageX - parentOffset.left;
var relY = e.pageY - parentOffset.top;
$(this).children('.product-item-hidden').css({
'top': relY + 'px',
'left': relX + 'px'
@duyngha
duyngha / helpers.php
Last active Jun 9, 2017
This file contains helper functions for wordpress
View helpers.php
<?php
/**
* This file contains helper functions for <project name>
*
* @since 1.0.0
* @author Duy Nguyen <duyngha@gmail.com>
*/
if (!function_exists('createExcerptFromContent')) {
/**
View massive-plugin.php
<?php
/**
* Plugin Name: Rennie Plugin
* Description: Controlling Rennie's functions
* Version: 1.0.0
* Author: Viet Artisans
* Author URI: https://vietartisans.io
* License: MIT
*/
You can’t perform that action at this time.