This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const a = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 'A', 'B', 'C', 'D', 'E', 'F']; | |
const genCol = (length = 6) => { | |
let text = ''; | |
if (length > 1) { | |
for (let i = 0; i < length; i++) { | |
text += `${a[Math.floor(Math.random() * 15)]}`; | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[core] | |
editor = code --wait | |
[alias] | |
last = log -1 HEAD | |
lg = log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit | |
s = !git status | |
c = !git commit -m | |
l = !git log --pretty=format:'%C(blue)%h%C(red)%d %C(white)%s - %C(cyan)%cn, %C(green)%cr' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
execute pathogen#infect() | |
syntax on | |
filetype plugin indent on | |
set number | |
colorscheme twilight256 | |
let g:airline_powerline_fonts = 1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var gulp = require('gulp'), | |
sass = require('gulp-sass'), | |
concat = require('gulp-concat'), | |
sourcemaps = require('gulp-sourcemaps'), | |
imagemin = require('gulp-imagemin'), | |
livereload = require('gulp-livereload'), | |
autoprefixer = require('gulp-autoprefixer'), | |
notify = require("gulp-notify"), | |
del = require('del'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function get_video_by_url($url, $params = null) | |
{ | |
if (!is_string($url)) return false; | |
$regexVM = '~ | |
# Match Vimeo link and embed code | |
(?:<iframe [^>]*src=")? # If iframe match up to first quote of src | |
(?: # Group vimeo url |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//http://cdnjs.com/libraries/jquery.meiomask | |
//https://github.com/fabiomcosta/jquery-meiomask | |
$('input#telefone').setMask({ | |
mask: '(99) 9999-99999', | |
autoTab: false | |
}).on("keyup change", function() { | |
var $this = $(this); | |
if ($this.val().length <= 14) { | |
$this.setMask({ | |
mask: '(99) 9999-99999', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var mozjpeg = require('imagemin-mozjpeg'); | |
module.exports = function (grunt) { | |
var json = { | |
js: { | |
src: [ | |
'src/js/jquery-1.11.2.js', | |
'src/js/SmoothScroll.js', | |
'src/js/main.js', | |
], | |
dest: 'assets/js/main.js', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
wp_reset_query(); | |
$args = array( | |
"post_type" => "post_type", | |
"orderby" => "menu_order" | |
); | |
$wp_query = new WP_Query(); | |
$wp_query->query($args); | |
if ( $wp_query->have_posts() ) | |
{ |