Skip to content

Instantly share code, notes, and snippets.

View benhowdle89's full-sized avatar

Ben Howdle benhowdle89

View GitHub Profile
@benhowdle89
benhowdle89 / index.html
Created July 12, 2012 23:40
A web page created at CodePen.io
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>50 Shades Of Grey &middot; CodePen</title>
<!--
Copyright (c) 2012 Ben Howdle, http://codepen.io/benhowdle89
Permission is hereby granted, free of charge, to any person obtaining
@benhowdle89
benhowdle89 / JS Class
Created July 22, 2012 11:09
A base class for JavaScript projects
​var myClass = function(){
var privateVar = 'do not look at me from the outside';
return {
publicVar: 'access me from anywhere',
fname: '',
@benhowdle89
benhowdle89 / gist:4559572
Last active December 11, 2015 06:28
WP Plugin/approach for custom gallery
If a plugin already exists then great, but I can't find one!
A client wants to simply select some images from the media
library and assign them to a "gallery". Now, I need to create a
page in the admin area that they can visit and then some UI to do the
selecting.
I then need to create, eg. gallery.php which is accessible on
their site for me to pull in those selected images and output them.
@benhowdle89
benhowdle89 / gist:5399314
Last active December 16, 2015 07:29
Slider desires
Carousel/slider/etc...
What are you main feature requests for a simplistic slider?
ie.
Animated sliding?
Easing?
var model.LineItems = [blah, blah, blah]; // pseudo array declaration
var projects = BB.Collection; // pseudo collection declaration
model.LineItems[1].ProjectNumber = 'xyz'; // an example value for a line item
//in view render function
for (x in model.LineItems) {
model.LineItems[x].projects = projects;
}
Name some sites/networks you check everyday, ie. Twitter, GitHub, Dribbble, etc...
@benhowdle89
benhowdle89 / gist:6266821
Last active December 21, 2015 06:49
Nested GH-pages
So, I create a gh-pages on my main account: benhowdle89.github.com repo and
point my domain at it http://benhowdle.im. I then create gh-pages in one of
my repos: so, http://benhowdle.im/svgeezy will point at my repo
benhowdle.github.com/svgeezy. That's all good.
HOWEVER.
What would happen if I create a folder in my jekyll site at the root,
ie. in benhowdle.github.com called "svgeezy"?
<ul class={{#oneOrMany posts}}{{/oneOrMany}}>
{{#each posts}}
<li>{{content}}</li>
{{/each}}
</ul>
@benhowdle89
benhowdle89 / gist:6975823
Created October 14, 2013 13:43
Displays all images on a page on sites like http://bukk.it for example. Run in console or make a Bookmarklet.
var a=document.links;i=0;for(l=a.length;i<l;i++){var b=new Image;b.src=a[i].href;a[i].insertBefore(b)};
@benhowdle89
benhowdle89 / gist:6990074
Created October 15, 2013 11:17
Forcing browser reflows
var forceReflow = function(el) {
el = el || document.body;
el.style.position = 'static';
setTimeout(function() {
el.style.position = 'relative';
}, 0);
}