Skip to content

Instantly share code, notes, and snippets.

View cuongdcdev's full-sized avatar
🤔
~~~

Cuong DC cuongdcdev

🤔
~~~
View GitHub Profile
@cuongdcdev
cuongdcdev / designer.html
Created October 11, 2015 09:59
designer
<link rel="import" href="../polymer/polymer.html">
<polymer-element name="my-element">
<template>
<style>
:host {
position: absolute;
width: 100%;
height: 100%;
@cuongdcdev
cuongdcdev / designer.html
Last active January 5, 2016 15:33
designer
<link rel="import" href="../topeka-elements/theme.html">
<link rel="import" href="../topeka-elements/topeka-resources.html">
<link rel="import" href="../topeka-elements/topeka-app.html">
<polymer-element name="my-element">
<template>
<style>
:host {
position: absolute;
#!/usr/bin/python
# -*- coding: utf-8 -*-
# source code : https://gist.github.com/dbieber/5146518
import getpass
import smtplib
from email.MIMEMultipart import MIMEMultipart
from email.MIMEBase import MIMEBase
from email.MIMEText import MIMEText
from email import Encoders
@cuongdcdev
cuongdcdev / simple-pagination.js
Created October 27, 2016 03:47 — forked from kottenator/simple-pagination.js
Simple pagination algorithm
// Implementation in ES6
function pagination(c, m) {
var current = c,
last = m,
delta = 2,
left = current - delta,
right = current + delta + 1,
range = [],
rangeWithDots = [],
l;
@cuongdcdev
cuongdcdev / angular-loadscript-with-documentwrite.js
Created November 30, 2016 10:03 — forked from subudeepak/angular-loadscript-with-documentwrite.js
Loading scripts on ngInclude (ng route) - Script loading directive
/**
* This module is a variant which supports document.write. If you need document.write use this instead
* Author: Deepak Subramanian @subudeepak(https://github.com/subudeepak)
* Distributed under MIT License
*/
/*global angular */
(function (ng) {
'use strict';
app.directive('script', function() {
return {
@cuongdcdev
cuongdcdev / gist:3f41e7392a6768e04cc1a5c6090ddfed
Created February 27, 2017 01:59 — 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ả
@cuongdcdev
cuongdcdev / media-queries.scss
Created March 18, 2017 16:33 — forked from chrisjlee/media-queries.scss
All Media Queries breakpoints
@media (min-width:320px) { /* smartphones, portrait iPhone, portrait 480x320 phones (Android) */ }
@media (min-width:480px) { /* smartphones, Android phones, landscape iPhone */ }
@media (min-width:600px) { /* portrait tablets, portrait iPad, e-readers (Nook/Kindle), landscape 800x480 phones (Android) */ }
@media (min-width:801px) { /* tablet, landscape iPad, lo-res laptops ands desktops */ }
@media (min-width:1025px) { /* big landscape tablets, laptops, and desktops */ }
@media (min-width:1281px) { /* hi-res laptops and desktops */ }
@cuongdcdev
cuongdcdev / gist:8b99bef4a83fb2e452f3da8615416e10
Created September 21, 2017 12:01 — forked from pitch-gist/gist:2999707
HTML: Simple Maintenance Page
<!doctype html>
<title>Site Maintenance</title>
<style>
body { text-align: center; padding: 150px; }
h1 { font-size: 50px; }
body { font: 20px Helvetica, sans-serif; color: #333; }
article { display: block; text-align: left; width: 650px; margin: 0 auto; }
a { color: #dc8100; text-decoration: none; }
a:hover { color: #333; text-decoration: none; }
</style>
@cuongdcdev
cuongdcdev / um-favicons.txt
Created December 23, 2017 09:11 — forked from wpdelighter/um-favicons.txt
List of font icons used in Ultimate Member Profile Tabs
um-icon-alert
um-icon-alert-circled
um-icon-android-add
um-icon-android-add-circle
um-icon-android-alarm-clock
um-icon-android-alert
um-icon-android-apps
um-icon-android-archive
um-icon-android-arrow-back
um-icon-android-arrow-down