// jQuery
$(document).ready(function() {
// code
})
This file contains 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 | |
class WPLazyLoadImages { | |
function __construct() { | |
// Add Our Filters and actions for the plugin | |
add_action('wp_enqueue_scripts', array($this, 'enqueue_lazyload')); | |
add_filter('the_content', array($this, 'filter_lazyload')); | |
add_action('wp_footer', array($this, 'footer_lazyload')); |
This file contains 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
#!/bin/bash | |
# Anh Nguyen <anh.ng8@gmail.com> | |
# 2016-04-30 | |
# MIT License | |
# This script takes in images from a folder and make a crossfade video from the images using ffmpeg. | |
# Make sure you have ffmpeg installed before running. | |
# The output command looks something like the below, but for as many images as you have in the folder. |
This file contains 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
-----BEGIN PGP SIGNED MESSAGE----- | |
Hash: SHA256 | |
11111 a | |
11112 aa | |
11113 aaa | |
11114 aaaa | |
11115 ab | |
11116 aba | |
11121 abaco |
This file contains 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
"use strict"; | |
// src: https://stackoverflow.com/a/28002292 | |
const getScript = (source, callback) => { | |
var script = document.createElement('script'); | |
var prior = document.getElementsByTagName('script')[0]; | |
script.async = 1; | |
script.onload = script.onreadystatechange = (_, isAbort) => { | |
if (isAbort || !script.readyState || /loaded|complete/.test(script.readyState)) { |
This file contains 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
(function (context, trackingId, options) { | |
const history = context.history; | |
const doc = document; | |
const nav = navigator || {}; | |
const storage = localStorage; | |
const encode = encodeURIComponent; | |
const pushState = history.pushState; | |
const typeException = 'exception'; | |
const generateId = () => Math.random().toString(36); | |
const getId = () => { |
This file contains 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
/* | |
* Copyright 2016 | |
* Mathis Rosenhauer | |
* | |
* All rights reserved. | |
* | |
* Redistribution and use in source and binary forms, with or without | |
* modification, are permitted provided that the following conditions | |
* are met: | |
* |
This file contains 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
jQuery.validator.addMethod("cnpj", function(cnpj, element) { | |
var numeros, digitos, soma, resultado, pos, tamanho, | |
digitos_iguais = true; | |
if (cnpj.length < 14 && cnpj.length > 15) | |
return false; | |
for (var i = 0; i < cnpj.length - 1; i++) | |
if (cnpj.charAt(i) != cnpj.charAt(i + 1)) { |