Skip to content

Instantly share code, notes, and snippets.

Justin Bennett zephraph

Block or report user

Report or block zephraph

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@zephraph
zephraph / __init__.py
Last active Aug 29, 2015
Quick python script for setting up a new barebones flask workspace
View __init__.py
from flask import Flask
app = Flask(__name__)
@zephraph
zephraph / Namespace.js
Last active Aug 29, 2015
Javascript namespacing made simple
View Namespace.js
Namespace = function(scope, definition) {
var root = typeof GLOBAL !== 'undefined' ? GLOBAL : window;
scope = scope.split('.');
for(var i = 0; i < scope.length; ++i) {
if(typeof root[scope[i]] === 'undefined')
root[scope[i]] = {};
root = root[scope[i]];
}
@zephraph
zephraph / singleton.h
Created Mar 1, 2015
Inheritable singleton class in C++
View singleton.h
#pragma once
#include<iostream>
#include<cstdlib>
template<typename T>
class Singleton
{
public:
inline static T& getInstance()
View imgur.js
// Builds out a request function with a default payload
function requestBuilder(api, settings) {
return function request(endpoint, payload) {
payload = $.extend(true, settings, payload || {});
return $.ajax(api + endpoint, payload);
}
}
// -- Imgur Module ----------------------------------------
@zephraph
zephraph / intern-es6.js
Created Oct 29, 2015
An example of intern using ES6
View intern-es6.js
import registerSuite from 'intern!object';
registerSuite({
setup() {},
beforeEach() {},
afterEach() {},
teardown() {},
testA() {},
testB() {},
testC() {}
@zephraph
zephraph / t3.template
Last active Dec 16, 2015
Could this potentially be linted?
View t3.template
Box.Application.add${ _.capitalize(type) }('${name}', (${type === 'service' ? 'application' : 'context'}) => {
/**
* __ __ ___ ___
* |__) |__) | \ / /\ | |__
* | | \ | \/ /--\ | |___
*
*/
<% if (type !== 'service') { %>
@zephraph
zephraph / SassMeister-input-HTML.html
Created Jan 19, 2016
Generated by SassMeister.com.
View SassMeister-input-HTML.html
<div class="EditorialPromo media">
<header class="EditorialPromo media-headline">
Editorial Promo
</header>
</div>
@zephraph
zephraph / SassMeister-input-HTML.html
Created Jan 26, 2016
Generated by SassMeister.com.
View SassMeister-input-HTML.html
<div class="EditorialPromo media">
<header class="EditorialPromo media-headline">
Editorial Promo
</header>
</div>
@zephraph
zephraph / SassMeister-input-HTML.html
Last active Jan 26, 2016
Generated by SassMeister.com.
View SassMeister-input-HTML.html
<div class="EditorialPromo">
<header class="EditorialPromo-headline">
Editorial Promo
</header>
</div>
@zephraph
zephraph / SassMeister-input-HTML.html
Created Jan 28, 2016
Generated by SassMeister.com.
View SassMeister-input-HTML.html
<div class="EditorialPromo EditorialPromo--3up">
<header class="Header">
<h1 class="Header-headline">What We're Loving Now</h1>
<a class="Header-cta" href="#">See More!</a>
<p class="Header-description">A few of the things we like</p>
</header>
<ul class="MediaList">
You can’t perform that action at this time.