Skip to content

Instantly share code, notes, and snippets.


James Holland jholl

View GitHub Profile
View gist:02c39a3ac441589e4c07
// Create two variables:
// 1) Create a '<span></span>' element that we'll eventually put into the DOM
// 2) Cache the container already in the DOM where we'll put the span
var itemCountSpan = document.createElement("SPAN"),
cart = document.getElementById('cart-icon-wrapper');
// Set the initial text and class for the span before we put into the DOM
jholl / DatabaseSeeder.php
Created Mar 27, 2015
DatabaseSeeder to extend table cleanups/seeding ea. run (Laravel 5)
View DatabaseSeeder.php
use Illuminate\Database\Seeder;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Filesystem\Filesystem;
class DatabaseSeeder extends Seeder {
* Seeders to run.
jholl / gist:34e419a42040f24f7562
Created Mar 27, 2015
gulpfile for laravel angular bower build
View gist:34e419a42040f24f7562
var elixir = require('laravel-elixir');
var paths = {
'bower': './vendor/bower_components/'
var paths = {
'fonts': 'resources/assets/fonts/',
'img': 'resources/assets/img/',
'svg': 'resources/assets/svg',
'sass': 'resources/assets/sass/',
'js': 'resources/assets/js/',
jholl / sba_counties.json
Created Mar 23, 2015
SBA Data US County by US State
View sba_counties.json
"county_name": null,
"description": null,
"feat_class": "Civil",
"feature_id": "36609",
"fips_class": "H1",
"fips_county_cd": "69",
"full_county_name": null,
"link_title": null,
View Test object top above window top
var winTop = $(window).scrollTop();
var $object = $('.some-div');
var objTopTrigger = this.offsetTop;
var objTopTriggerAdj = 400;
if (objTopTrigger + objTopTriggerAdj < winTop){
if (objTopTrigger + objTopTriggerAdj > winTop){
jholl / level-like
Created Jan 2, 2014
level like objects
View level-like
<script type="text/javascript">
H = 0;
if ($(this).innerHeight() > H){
H = $(this).innerHeight();
jholl / variables-custom.less
Created Nov 29, 2013
BS v3 variables-custom.less -- add @import "rootfoo/variables-custom.less" to compiling .less file
View variables-custom.less
/* Flat UI @design-modo */
@fui-turq-lt: #1abc9c;
@fui-turq: #16a085;
@fui-green-lt: #2ecc71;
@fui-green: #27ae60;
@fui-blue-lt: #3498db;
@fui-blue: #2980b9;
@fui-purple-lt: #9b59b6;
@fui-purple: #8e44ad;
@fui-navy-lt: #34495e;