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 els = document.getElementsByClassName('reel-item-endpoint'); | |
var ids = []; | |
for(i = 0; i < els.length; i++) { | |
var el = els[i]; | |
if(el) { | |
if (!el.href || !el.href.match(/shorts\/([a-zA-Z0-9_-]+)$/)) { | |
continue; | |
} | |
ids.push('https://www.youtube.com/watch?v=' + el.href.split('/shorts/')[1].split('/')[0]); | |
} |
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
#!/bin/zsh |
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
PATH="$PATH:~/opt/bin" # appending | |
PATH="~/opt/bin:$PATH" # prepending |
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
ob_start(); | |
include dirname(plugin_dir_path(__FILE__)) . '/email-template.php'; | |
$html = ob_get_clean(); |
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
import dashify from 'dashify'; | |
export class Sniffer { | |
constructor() { | |
this.init(); | |
Object.keys(this.list).forEach(function(info) { | |
Object.defineProperty(this, info, { | |
get: function() { | |
return this.list[info]; |
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
options: | |
formatter: stylish | |
files: | |
include: '**/*.s+(a|c)ss' | |
rules: | |
# Extends | |
extends-before-mixins: 1 | |
extends-before-declarations: 1 | |
placeholder-in-extend: 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
/** | |
* Set CSS values on element | |
* | |
* @param {any} el | |
* @param {Object} styles | |
*/ | |
function css(el, styles) { | |
if (!el) return; | |
if (Array.isArray(el) || el instanceof NodeList) { | |
el.forEach((n) => { |
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
/** | |
* Bind methods | |
* ex. bind(this, 'onClick', 'setHeight'); | |
* | |
* @param {Object} self | |
* @param {string} functions | |
*/ | |
function bind(self, ...functions) { | |
functions.forEach((name) => { | |
self[name] = self[name].bind(self); |
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
/** | |
* Serializes the object and arrays and objects of the main object. | |
* | |
* @param {Object} data - the object to serialize | |
* @param {String} prefix - used internally to keep track of the nesting | |
*/ | |
function deepSerialize(data, prefix = '') { | |
if (typeof data == 'function') return prefix != '' ? prefix + '=null' : ''; | |
const array = []; | |
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
"use strict"; | |
var webpack = require('webpack'); | |
const path = require('path'); | |
var loaders = require('./tools/webpack.loaders'); | |
var ExtractTextPlugin = require('extract-text-webpack-plugin'); | |
var HtmlWebpackPlugin = require('html-webpack-plugin'); | |
var DashboardPlugin = require('webpack-dashboard/plugin'); | |
var BrowserSyncPlugin = require('browser-sync-webpack-plugin'); | |
require("babel-polyfill"); |
NewerOlder