Skip to content

Instantly share code, notes, and snippets.

View michaelgilley's full-sized avatar

Michael Gilley michaelgilley

View GitHub Profile
@michaelgilley
michaelgilley / _compass-retina-sprites.scss
Last active December 14, 2015 05:08
Use for best regular and retina (HD) sprites in a Compass project. To work correctly use two sets of the same sprite images in separate directories within your project images path. (Default is "regular" and "retina" within a singular "sprites" directory.) Both image sets should be identical in naming and composition with the retina images 200% l…
$regularSpritePath: "sprites/regular" !default;
$retinaSpritePath: "sprites/retina" !default;
$spriteHoverClass: ":hover" !default;
$regular: sprite-map($regularSpritePath + "/*.png", $layout: smart);
$retina: sprite-map($retinaSpritePath + "/*.png", $layout: smart);
$sprite-regular-url: sprite-url($regular);
$sprite-retina-url: sprite-url($retina);
@michaelgilley
michaelgilley / foundation_structure_nav.html
Last active December 17, 2015 13:29
Example of how to build a Top Bar navigation for the Foundation 4.x framework in Expression Engine using Structure.
<nav class="top-bar">
<ul class="title-area">
<li class="name"></li>
<li class="toggle-topbar menu-icon">
<a href="#"><span>Menu</span></a>
</li>
</ul>
<section class="top-bar-section">
{exp:structure:nav mode="full" css_id="nav-drop-pages" css_class="left" has_children_class="has-dropdown"}
<script>
module.exports = function(grunt) {
grunt.initConfig({
/*
copy header-template.html which will have placeholders for injecting css,js
*/
copy: {
main: {
files: [
@michaelgilley
michaelgilley / yt-cats.json
Last active August 29, 2015 13:57
YT Categories
{
"app:categories": {
"-xmlns:app": "http://www.w3.org/2007/app",
"-xmlns:atom": "http://www.w3.org/2005/Atom",
"-xmlns:yt": "http://gdata.youtube.com/schemas/2007",
"-fixed": "yes",
"-scheme": "http://gdata.youtube.com/schemas/2007/categories.cat",
"atom:category": [
{
"-term": "Film",

Keybase proof

I hereby claim:

  • I am michaelgilley on github.
  • I am michaelgilley (https://keybase.io/michaelgilley) on keybase.
  • I have a public key whose fingerprint is 3E6D 2B26 377C 25EF FE9C 510F 10A4 E16B 7AF0 AEB1

To claim this, I am signing this object:

Angular-Less Bootstrap

Just a bootstrap for setting up Angular-based pages with bootstrap.css and angular-strap preloaded.

A Pen by Michael Gilley on CodePen.

License.

@michaelgilley
michaelgilley / webpack_profile_nodeapi.js
Created June 14, 2016 15:22
Snippet for grabbing Webpack stats in JSON format when using the Node API.
import webpack from 'webpack'
import {writeFileSync} from 'fs'
import {resolve} from 'path'
import config from 'webpack.config.js'
import webpackDevServer from 'webpack-dev-server'
config.profile = true
const compiler = webpack(config)
import Backoff from 'backo2';
const BrowserWebSocket = global.WebSocket || global.MozWebSocket;
const DEF_PING_TIMEOUT = 2 * 60 * 1000;
const PONG = { op: 'PONG' };
export default class Socket {
constructor(opts = {}) {
this.uri = this.buildUri(opts);
import React, { Component, PropTypes } from 'react';
import Button from 'grommet/components/Button';
import Spinning from 'grommet/components/icons/Spinning';
import './styles.scss';
export const SimpleBusyButton = ({ enabled, primary, ...props }) => {
const onClick = enabled ? props.onClick : undefined;
const icon = enabled ? props.icon : <Spinning />;
import { put, call, all } from 'redux-saga/effects';
import xhr from 'services/xhr';
const trailingSlashes = /\/*$/;
const filterAllActions = actions => all([].concat(actions).map(a => !!a && put(a)).filter(a => a));
// Run a single api call inline
// example:
// yield fork(simpleApiSaga, myApi.get, {