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
var mediaJSON = { "categories" : [ { "name" : "Movies", | |
"videos" : [ | |
{ "description" : "Big Buck Bunny tells the story of a giant rabbit with a heart bigger than himself. When one sunny day three rodents rudely harass him, something snaps... and the rabbit ain't no bunny anymore! In the typical cartoon tradition he prepares the nasty rodents a comical revenge.\n\nLicensed under the Creative Commons Attribution license\nhttp://www.bigbuckbunny.org", | |
"sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4" ], | |
"subtitle" : "By Blender Foundation", | |
"thumb" : "images/BigBuckBunny.jpg", | |
"title" : "Big Buck Bunny" | |
}, | |
{ "description" : "The first Blender Open Movie from 2006", | |
"sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ElephantsDream.mp4" ], |
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 | |
/** | |
* Plugin Name: Contact Form 7 Code Editor | |
* Version: 1.0.0 | |
* Plugin URI: https://latinandcode.com/ | |
* Author: Eugene Zhuchenko | |
* Author URI: eugenezhuchenko.com | |
* Text Domain: elementor-latinandcode | |
* Domain Path: /languages/ | |
* License: GPL v3 |
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
/** | |
* map_value() | |
* | |
* Re-maps a number from one range to another. That is, a value of fromLow would get mapped to toLow, a value of fromHigh to toHigh, values in-between to values in-between, etc. | |
* @url: https://www.arduino.cc/reference/en/language/functions/math/map/ | |
* | |
* @param $val integer - the number to map | |
* @param $in_min integer - the lower bound of the value’s current range | |
* @param $in_max integer - the upper bound of the value’s current range | |
* @param $out_min integer - the lower bound of the value’s target range |
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
/** | |
* Search for nice and short domains. | |
* Use for example a NameCheap | |
*/ | |
// Flatten array. Ex.: ['aa', 'ab', ['ac', 'ad']] => ['aa', 'ab', 'ac', 'ad'] | |
const flatten = arr => [].concat.apply([], arr); | |
// Remove non-unique items from given array | |
const uniq = a => [...new Set(a)]; |
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
// Configuration objects / Extend default mixin params with custom ones | |
// @src: https://hugogiraudel.com/2014/05/05/bringing-configuration-objects-to-sass/ | |
// Default var for overriding | |
$params: () !default; | |
// @param {map} $obj - object with default params | |
// @param {map} $ext-obj - object params to extend the default | |
@function extend($obj, $ext-obj) { | |
@return map-merge($obj, $ext-obj); | |
} |
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
startAnimating(function(){ | |
console.log('test') | |
}, 10); | |
function startAnimating(cb, fps) { | |
var stop = false; | |
var frameCount = 0; | |
var fps, fpsInterval, startTime, now, then, elapsed; | |
fpsInterval = 1000 / fps; |
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
/* Flex mixin */ | |
// Map of all flexbox container properties | |
$flex-config: ( | |
flex-direction: (row, row-reverse, column, column-reverse), | |
flex-wrap: (nowrap, wrap, wrap-reverse), | |
justify-content: (flex-start, flex-end, center, space-between, space-around), | |
align-items: (stretch, flex-start, flex-end, center, baseline), | |
align-content: (stretch, flex-start, flex-end, center, space-between, space-around) | |
); |
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
/// Dependency - str-replace mixin from https://css-tricks.com/snippets/sass/str-replace-function/ | |
/// Replace `$search` with `$replace` in `$string` | |
/// @author Hugo Giraudel | |
/// @param {String} $string - Initial string | |
/// @param {String} $search - Substring to replace | |
/// @param {String} $replace ('') - New value | |
/// @return {String} - Updated string | |
@function str-replace($string, $search, $replace: '') { | |
$index: str-index($string, $search); |
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
{%- macro zeroCheck(num=0) -%} | |
{{- '0'+num if num < 9 else num -}} | |
{%- endmacro -%} | |
{%- macro checkDefault(num=0, rand=1) -%} | |
{{- num if num else range(1, rand) | random -}} | |
{%- endmacro -%} | |
{%- macro randTime(hour='', minute='') -%} | |
{{- zeroCheck(checkDefault(hour, 24)) -}}:{{- zeroCheck(checkDefault(minute, 59)) -}} |
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
/// Dependency - str-replace mixin from https://css-tricks.com/snippets/sass/str-replace-function/ | |
/// Replace `$search` with `$replace` in `$string` | |
/// @author Hugo Giraudel | |
/// @param {String} $string - Initial string | |
/// @param {String} $search - Substring to replace | |
/// @param {String} $replace ('') - New value | |
/// @return {String} - Updated string | |
@function str-replace($string, $search, $replace: '') { | |
$index: str-index($string, $search); |
NewerOlder