Skip to content

Instantly share code, notes, and snippets.

Micah asuh

Block or report user

Report or block asuh

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View get-css-custom-prop.js
* Pass in an element and its CSS Custom Property that you want the value of.
* Optionally, you can determine what datatype you get back.
* @param {String} propKey
* @param {HTMLELement} element=document.documentElement
* @param {String} castAs='string'
* @returns {*}
const getCSSCustomProp = (propKey, element = document.documentElement, castAs = 'string') => {
asuh / package.json
Last active Dec 19, 2019
NPM only, no Grunt, Gulp, Broccoli or Brunch
View package.json
"name": "_s",
"version": "1.0.1",
"scripts": {
"clean": "rimraf style.css",
"notify": "notify -h",
"serve": "browser-sync start --proxy 'my.asuh' --files '**/*.css, **/*.js, *.php, **/*.json, dist/images/*'",
"imagemin": "imagemin src/images/* -o dist/images",
"icons": "svgo -f src/images/icons -o dist/images/icons && svg-sprite-generate -d dist/images/icons -o dist/images/icons/sprite.svg",
"lint-scss": "stylelint 'sass/**/*.scss' --syntax scss --config node_modules/stylelint-config-wordpress/scss.js",

Advanced JavaScript Learning Resources

This is a list of advanced JavaScript learning resources from people who responded to this [Tweet][13] and this [Tweet][20].

  • [You Don't Know JS][3]

  • [Frontend Masters courses by Kyle Simpson][12]

  • [@mpjme][6]'s [YouTube videos][5]

bekarice / filter-wc-orders-by-gateway.php
Last active Dec 3, 2019
Filters WooCommerce Orders by Payment Gateway Used
View filter-wc-orders-by-gateway.php
* Plugin Name: Filter WooCommerce Orders by Payment Method
* Plugin URI:
* Description: Filters WooCommerce orders by the payment method used :)
* Author: SkyVerge
* Author URI:
* Version: 1.0.0
* Text Domain: wc-filter-orders-by-payment
glaszig / mkp2pblocklist
Last active Jan 21, 2019
creates a blocklist for your p2p endeavors
View mkp2pblocklist
#!/usr/bin/env sh
# inspired by
# usage:
# mkp2pblocklist > /tmp/blockp2p.list
# or
# mkp2pblocklist | gzip -9 > /tmp/blockp2p.list.gz
georgiecel / wp-comment-walker
Last active Sep 20, 2019
Custom comment walker for HTML5 friendly WordPress comment and threaded replies. To be inserted in functions.php.
View wp-comment-walker
class comment_walker extends Walker_Comment {
var $tree_type = 'comment';
var $db_fields = array( 'parent' => 'comment_parent', 'id' => 'comment_ID' );
// constructor – wrapper for the comments list
function __construct() { ?>
<section class="comments-list">
davatron5000 / Sublime Text
Last active Dec 23, 2019
A new user's guide to SublimeText 2. Estimated reading time: 2 mins. Estimated workthrough time: 12 minutes.
View Sublime Text

Make it useful

  • Install Package Control. For SublimeText 2, paste the following in Terminal:
import urllib2,os; pf='Package Control.sublime-package'; ipp = sublime.installed_packages_path(); os.makedirs( ipp ) if not os.path.exists(ipp) else None; urllib2.install_opener( urllib2.build_opener( urllib2.ProxyHandler( ))); open( os.path.join( ipp, pf), 'wb' ).write( urllib2.urlopen( '' +pf.replace( ' ','%20' )).read()); print( 'Please restart Sublime Text to finish installation')

From here on out, use Package Control to install everything. +Shift+P, then type Install to get a list of installable packages you can 'livesearch through. After installing plugins, they should be running.

jareware /
Last active Jan 14, 2020
Advanced SCSS, or, 16 cool things you may not have known your stylesheets could do

⇐ back to the gist-blog at

Advanced SCSS

Or, 16 cool things you may not have known your stylesheets could do. I'd rather have kept it to a nice round number like 10, but they just kept coming. Sorry.

I've been using SCSS/SASS for most of my styling work since 2009, and I'm a huge fan of Compass (by the great @chriseppstein). It really helped many of us through the darkest cross-browser crap. Even though browsers are increasingly playing nice with CSS, another problem has become very topical: managing the complexity in stylesheets as our in-browser apps get larger and larger. SCSS is an indispensable tool for dealing with this.

This isn't an introduction to the language by a long shot; many things probably won't make sense unless you have some SCSS under your belt already. That said, if you're not yet comfy with the basics, check out the aweso

You can’t perform that action at this time.