Skip to content

Instantly share code, notes, and snippets.


Stephen Young young-steveo

View GitHub Profile
young-steveo / a.html
Last active Aug 29, 2015
Developing With AngularJS? Forget jQuery Exists.
View a.html
<div cool-stuff>
<li class="active"><a class="link" href="#one">Click Me For One</a></li>
<li><a class="link" href="#two">Click Me For Two</a></li>
<p id="one" class="content">Some Cool stuff</p>
<p id="two" class="content hidden">Some Other Stuff</p>

Keybase proof

I hereby claim:

  • I am young-steveo on github.
  • I am youngsteveo ( on keybase.
  • I have a public key whose fingerprint is A446 0008 5127 8FC9 4B0F EDE4 727C 3EA1 4247 B30B

To claim this, I am signing this object:

young-steveo /
Last active Dec 21, 2015
Zumba Javascript Code Standard for internal and third-party use

Zumba Javascript Code Standard


  1. Preface
  2. Quick Reference
  3. General Naming
  4. Specific Naming
  5. Layout
  6. Variables
young-steveo / popper.js
Created Jan 16, 2014
Utility library that wraps bootbox.js and adapts it to use deferred objects
View popper.js
define(['jquery', 'bootbox'], function($, bootbox){
* @author
* @constructor
var Popper = function(){};
* Flat map of semantic interface methods to Deferred object methods.
View pdf-controller-factory.js
// Factory
function createPdfsController(container) {
// the dependencies required by the service. This is still lazily evaluated,
// and mockable as long as you register the mock before accessing the service
// in your tests.
const PdfService = container.service.PdfGenerator;
return {
create: (req, res, next) => {
const content_id = req.params.content_id;
const pdf_id = PdfService.generate(content_id);
View bootstrap.js
const path = require('path');
const glob = require('glob');
const express = require('express');
const Bottle = require('bottlejs');
const bottle = Bottle.pop('MyPdfApp'); // name your instance here.
glob.sync(path.join(path.resolve(__dirname), 'app/**/*.js')).forEach((match) => {
require(match); // just require, no need to pass the bottle reference.
View gist:e69a5ba8c9b2feed84bfabeb05082fb0
Version: Keybase OpenPGP v2.0.53
young-steveo / aop.php
Last active Jun 20, 2018
Array Oriented Programming
View aop.php
final class User extends Requester {
public function search(array $params) : array {
if (empty($params["username"])) {
throw new \Exception("Username is required.");
if (empty($params["name"])) {
$first = $params["first_name"] ?? '';
$last = $params["last_name"] ?? '';
$params["name"] = "$first $last";
young-steveo / SearchParams.php
Last active Jun 20, 2018
Array Oriented Programming - Search Params
View SearchParams.php
final class SearchParams {
private $username;
private $name;
public function __construct(string $username, string $name) {
$this->username = $username;
$this->name = $name;
public function toArray() : array {
return [
young-steveo / search.php
Last active Jun 20, 2018
Better Example
View search.php
$model = new User();