Skip to content

Instantly share code, notes, and snippets.


Niall O'Brien niallobrien

  • Waterford, Ireland
View GitHub Profile
View gist:bd969710f3c35038ff0a
function equalizeHeight(watch, target) {
var maxHeight = -1;
$(watch).each(function () {
maxHeight = maxHeight > $(this).outerHeight() ? maxHeight : $(this).outerHeight();
$(target).each(function () {
niallobrien / gulpfile.js
Created Sep 13, 2014
Current gulpfile for Expression Engine
View gulpfile.js
'use strict';
// generated on 2014-09-12 using generator-ee-foundation 0.1.0
var gulp = require('gulp');
var spawn = require('child_process').spawn;
var browserSync = require('browser-sync');
var reload = browserSync.reload;
var gutil = require('gulp-util');
var runSequence = require('run-sequence');
niallobrien / app.js
Created Aug 21, 2014
Execute JS based on the current screen-size (Foundation's media queries)
View app.js
var mediaStateContainer = document.querySelector('.mq'),
mediaState = window.getComputedStyle(mediaStateContainer, ':before').getPropertyValue('content');
if (mediaState === 'small' ) {
// JS to run when we're on mobile.
niallobrien /
Created Aug 7, 2014 — forked from jookyboi/
Rails-related Gems and guides to accelerate your web project.


  • Bundler - Bundler maintains a consistent environment for ruby applications. It tracks an application's code and the rubygems it needs to run, so that an application will always have the exact gems (and versions) that it needs to run.
  • rabl - General ruby templating with json, bson, xml, plist and msgpack support
  • Thin - Very fast and lightweight Ruby web server
  • Unicorn - Unicorn is an HTTP server for Rack applications designed to only serve fast clients on low-latency, high-bandwidth connections and take advantage of features in Unix/Unix-like kernels.
  • SimpleCov - SimpleCov is a code coverage analysis tool for Ruby 1.9.
  • Zeus - Zeus preloads your Rails app so that your normal development tasks such as console, server, generate, and specs/tests take less than one second.
  • [factory_girl](h
niallobrien /
Created Aug 7, 2014 — forked from jookyboi/
Here are a set of libraries, plugins and guides which may be useful to your Javascript coding.


  • jQuery - The de-facto library for the modern age. It makes things like HTML document traversal and manipulation, event handling, animation, and Ajax much simpler with an easy-to-use API that works across a multitude of browsers.
  • Backbone - Backbone.js gives structure to web applications by providing models with key-value binding and custom events, collections with a rich API of enumerable functions, views with declarative event handling, and connects it all to your existing API over a RESTful JSON interface.
  • AngularJS - Conventions based MVC framework for HTML5 apps.
  • Underscore - Underscore is a utility-belt library for JavaScript that provides a lot of the functional programming support that you would expect in Prototype.js (or Ruby), but without extending any of the built-in JavaScript objects.
  • lawnchair - Key/value store adapter for indexdb, localStorage
niallobrien /
Last active May 2, 2016
Laravel & Angular Asset Pipeline with Gulp

Laravel & Angular


This setup involves creating a Laravel API and an Angular client-app with Gulp covering the asset pipeline.

Our Laravel API server will serve one view only and that is to simply load the Angular app.

First, create a new directory for your project. We're going to place the server and client directories in here. You'll need to install Laravel, Yeoman, generator-gulp-angular and any other dependencies.


View gist:293f174845fc04d89fc0
.factory('StaffList', function ($http) {
var staffList = [];
return {
all: function () {
// returns promise object
return staffList = $http.get('API_URL', {
cache: true
View gist:3373e6ec7a87021206fb
<aside id="sidebar" data-magellan-expedition="fixed" data-options="destination_threshold:190;threshold:200;throttle_delay:50;">
<dl class="accordion" data-accordion>
<dd id="mobile-sub-menu-button">
<a href="">Select page to visit</a>
<dd class="show-for-medium-up">
<a href="#panel1">Heading 1</a>
<div id="panel1" class="content">
View gist:11324771
'use strict';
// generated on 2014-04-26 using generator-gulp-bootstrap 0.0.1
var gulp = require('gulp');
var browserSync = require("browser-sync");
// load plugins
var $ = require('gulp-load-plugins')();
gulp.task('styles', function () {
View gist:11220294
'use strict';
// generated on 2014-04-23 using generator-gulp-bootstrap 0.0.1
var gulp = require('gulp');
var browserSync = require('browser-sync');
// load plugins
var $ = require('gulp-load-plugins')();
gulp.task('styles', function () {