Skip to content

Instantly share code, notes, and snippets.

Aaron Snowberger jekkilekki

View GitHub Profile
View 01-react-syntax.jsx
// React Native syntax
var MyComponent = React.createClass({
render() {
return <div>
<h1>Hello World</h1>
<p>This is my first React component!</p>
jekkilekki / taxonomy-dropdowns.js
Created Nov 21, 2016
WordPress taxonomy dropdowns - if too long (default is to show all taxonomies)
View taxonomy-dropdowns.js
jQuery(document).ready(function($) {
* For Taxonomy dropdowns in Post meta
$( '.cat-links .jkl-tax-switch, .tags-links .jkl-tax-switch' ).click( function( e ) {
if( $( this ).next( 'ul' ).hasClass( 'childopen' ) ) {
$( this ).next( 'ul' ).removeClass( 'childopen' );
} else {
jekkilekki / Fix Vagrant nginx
Last active Nov 13, 2017
Vagrant Nginx binding error fix
View Fix Vagrant nginx

I was the following problems with my VVV installation earlier this year. The following are the steps I took to fix things:

Update to PHP7

Since November PHP7 is the default for VVV, but at that time (Sept/Oct), it was not. But it was included on the [develop] branch (not [master]) of VVV.

  1. Switch to [develop] : git checkout develop
  2. git pull

nginx not binding to port 80

jekkilekki /
Created Oct 21, 2016
Clone ALL branches of a git repo
# From Ray Villalobos' course on AngularJS2
# @link
git clone --bare .git # Clones a bare version of the repo
git config --bool core.bare false # Switch bare repo to normal version of the repo
git reset --hard # Repo resets to the master branch at the latest commit
jekkilekki / custom-wp-hooks.php
Created Oct 16, 2016
Create custom Action and Filter hooks for your plugins in WordPress
View custom-wp-hooks.php
* Learn how to create custom Action and Filter hooks.
* @link
* 1. Custom FILTER Hook ------------------------------
jekkilekki / customizer-pseudo-elements.js
Last active Feb 6, 2017
Use a Background Gradient in WP Customizer + Various other Customizer functions
View customizer-pseudo-elements.js
* Make the WP Customizer also recognize and adjust pseudo- elements like :before and :hover
* Non-instantaneous update - requires partial page refresh
// Highlight colors
wp.customize( 'highlight_color', function( value ) {
value.bind( function( to ) {
$( 'a:visited, a:hover, a:focus, a:active, .entry-content a, .entry-summary a' ).css( {
jekkilekki / clearfix.css
Created Nov 30, 2015
Collection of Quick CSS Gists
View clearfix.css
/* Courtesy of CSS Tricks: */
.group:after {
content: "";
display: table;
clear: both;
jekkilekki /
Last active Nov 13, 2015
Fix the WP Jetpack Likes text on Pages

With Jetack "Likes" turned on, when logged in, in the wpadminbar, the "Like" button text doesn't line up:

Like text out of line

To fix it, add: line-height: inherit;

To: #wpadminbar .quicklinks li#wp-admin-bar-wpl-like > a { ... }

jekkilekki / wp-walker-menu.php
Last active Nov 5, 2016
Create a Custom Menu Walker for a WordPress Menu
View wp-walker-menu.php
* Add this code to your functions.php file
* @link
class themeslug_walker_nav_menu extends Walker_Nav_Menu {
// add classes to ul sub-menus
function start_lvl( &$output, $depth = 0, $args = array() ) {
jekkilekki /
Last active Jul 27, 2017
Make a Back to Top button in WordPress
You can’t perform that action at this time.