Skip to content

Instantly share code, notes, and snippets.

View jonotron's full-sized avatar

Jonathan Bowers jonotron

View GitHub Profile
@jonotron
jonotron / moonwalkers.js
Created August 15, 2018 20:49
Moonwalkers
// taken from https://github.com/olivernn/moonwalkers
export default [
{
id: 'alan_bean',
name: 'alan bean',
body:
'Alan Bean was one of the third group of astronauts named by NASA in October 1963. He served as backup astronaut for the Gemini 10 and Apollo 9 missions. Captain Bean was lunar module pilot on Apollo 12, mans second lunar landing. In November 1969, Captain Bean and Captain Pete Conrad landed in the moons Ocean of Stormsafter a flight of some 250,000 miles. They explored the lunar surface, deployed several lunar surface experiments, and installed the first nuclear power generator station on the moon to provide the power source. Captain Richard Gordon remained in lunar orbit photographing landing sites for future missions. Captain Bean was spacecraft commander of Skylab Mission II (SL-3), July 29 to September 25, 1973. With him on the 59-day, 24,400,000 mile world record setting flight were scientist-astronaut Dr. Owen K. Garriott and Marine Corps Lieutenant Colonel Jack R. Lous
@jonotron
jonotron / gist:4a915b9e8f9ac22ee290d71f7c3ec42a
Created December 21, 2017 19:52
blockstack verification
Verifying my Blockstack ID is secured with the address 13SszAmqLX2EvF1j6pxf6tLsPFFJ1he6y1 https://explorer.blockstack.org/address/13SszAmqLX2EvF1j6pxf6tLsPFFJ1he6y1

Keybase proof

I hereby claim:

  • I am jonotron on github.
  • I am jonotron (https://keybase.io/jonotron) on keybase.
  • I have a public key whose fingerprint is B622 BDC5 9F16 6786 6405 C3B1 E0BA 1847 CD82 C209

To claim this, I am signing this object:

@jonotron
jonotron / moduleA.js
Created June 25, 2013 16:59
IIFE to solve circular dependency issues.
// Module A
// depends on Module B
(function() {
require('./moduleB');
})();
@jonotron
jonotron / singleton.js
Created November 29, 2012 04:33
marionette.application singleton pattern
// usage:
// var app = require('singleton');
define(function(require) {
var Marionette = require('backbone.marionette');
// static instance of a Marionette.Application
var app = null;
// singleton function
function getSingleton() {
@jonotron
jonotron / backbone.dualstorage.relational.js
Created July 24, 2012 21:43
Recursively create UUIDs on Backbone.RelationalModels when saving via Backbone.Dualstorage
var _create = window.Store.prototype.create; // reference to original create
/**
* Create a slightly more compliant UUID generator
* credit: http://stackoverflow.com/posts/2117523/revisions
*
* @returns generated UUID
*/
var generateId = window.Store.prototype.generateId = function() {
return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) {
@jonotron
jonotron / gist:1512332
Created December 22, 2011 23:33
Access bootstrap popover node
$('#thing-with-popover-attached').data('popover').tip(); // returns the popover DOM node
@jonotron
jonotron / MyControllerTest.php
Created November 29, 2011 23:07
Functional test ACLs in Symfony
<?php
namespace AcmeBundle\Tests\Controller;
use Liip\LiipFunctionalTestBundle\Test\WebTestCase;
class MyControllerTest extends WebTestCase {
public function testSomeAclStuff() {
$this->runCommand('doctrine:database:drop', array('connection' => 'acl', 'force' => true));
$this->runCommand('init:acl');