Skip to content

Instantly share code, notes, and snippets.

smutek /
Last active Apr 28, 2021
Bootstrap 4 Walker for Sage 9


This is a frankensteind version of the current Soil nav walker, by the Roots team, and Michael Remoero's Sagextras walker. All credit goes to those good folks. :)


  • Replace the contents of header.blade.php with the attached header.
  • Copy the walker.php file to the /app directory.
  • Add walker.php to the Sage required files array in resources/functions.php - eg. on a stock Sage install the entry would look like:
almost /
Last active Sep 12, 2019
Reactive 2016 Lightning Talk Proposal: Get Flow

This is a proposal for a lightning talk at the Reactive 2016 conference.

NOTE: If you like this, star the Gist - the amount of stars decides whether it makes the cut! You could also Retweet if you want :)

Get Flow

Type checking JavaScript with Flow

JavaScript is a dynamic language, and there's nothing wrong with that. It allows quick iteration and lowers barriers. However, sometimes some compile-time type checking is just what you need to keep your code in line and give yourself the confidence to build bigger and faster. Flow gives the best of both worlds. You can have normal JavaScript but you can also add types where they're helpful, and it adds zero cost at runtime. In this talk I'll show Flow as it applies to a Redux & React codebase.

View acme-client-runner.rb
#!/usr/bin/env ruby
# We're going to need a private key.
require 'openssl'
# Initialize the client
require 'acme/client'
# We need an ACME server to talk to, see
ACCOUNT_FILE = 'account_key.pem'
retlehs / header.php
Created Apr 29, 2015
Sage header template for Bootstrap top navbar component
View header.php
// This file assumes that you have included the nav walker from
// somewhere in your theme.
<header class="banner navbar navbar-default navbar-static-top" role="banner">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target=".navbar-collapse">
<span class="sr-only"><?= __('Toggle navigation', 'sage'); ?></span>
johnyanarella / querystring.underscore.js
Last active Dec 15, 2015
toQueryString() and fromQueryString() mixins for underscore.js
View querystring.underscore.js
* Copyright (c) 2012-2013 [CodeCatalyst, LLC](
* Open source under the [MIT License](
require( [ 'underscore' ], function ( _ ) {
_.mixin( {
'toQueryString': function ( parameters ) {
var queryString = _.reduce(
function ( components, value, key ) {