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
/** | |
* Attributes: | |
* close-icon: String | |
* | |
* Example: | |
* <global-alert> | |
* <h2>This is a title</h2> | |
* <p>This is a paragraph</p> | |
* </global-alert> | |
*/ |
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
Show hidden characters
{ | |
"PHP Elementor": { | |
"scope": "php,html", | |
"prefix": "elementor", | |
"body": [ | |
"<?php", | |
"namespace Theme\\Elementor;", | |
"", | |
"use Elementor\\Controls_Manager;", | |
"use Elementor\\Controls_Stack;", |
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
export const diffTIme = (time1, time2) => { | |
const date1 = new Date(time1); | |
const date2 = new Date(time2); | |
const diff = date2.getTime() - date1.getTime(); | |
let minutes = Math.floor(diff / (1000 * 60)) % 60; | |
let hours = 0; | |
let days = 0; | |
if (minutes > 59) { | |
hours = Math.floor(minutes / 60); | |
minutes %= 60; |
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
const objectDiff = (obj1, obj2) => { | |
// Make sure an object to compare is provided | |
if (!obj2 || Object.prototype.toString.call(obj2) !== '[object Object]') { | |
return obj1; | |
} | |
let diffs = {}; | |
let key; |
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
@mixin color-modifiers($attribute: 'color', $selector: '.') { | |
@each $name, $color in $colors { | |
&#{$selector}#{$name} { | |
@each $tone, $hex in $color { | |
& #{$selector}#{$tone} { | |
#{$attribute}: $hex; | |
} | |
} | |
} | |
} |
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 Deck = (function() { | |
var cards = []; | |
var settings = { | |
deckSize: 52, | |
cardSets: 4, | |
uniqueSets: function() { return this.deckSize / this.cardSets } | |
}; |
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
Accounting | |
Airlines/Aviation | |
Alternative Dispute Resolution | |
Alternative Medicine | |
Animation | |
Apparel & Fashion | |
Architecture & Planning | |
Arts & Crafts | |
Automotive | |
Aviation & Aerospace |
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 | |
// @Description | |
// Creates and assigns categories to a list of post URLs via a CSV file | |
// If we have a file to parse | |
if ( ($handle = fopen( get_stylesheet_directory() . "/categories.csv", "r" ) ) !== FALSE ) { | |
// While we are parsing the CSV | |
// Every iteration is 1 row | |
// @example fgetcsv($handle, $max_length, $delimiter) |