Skip to content

Instantly share code, notes, and snippets.


Dustin Johnson dustinrjo

  • Los Angeles
View GitHub Profile
dustinrjo /
Last active Dec 1, 2015
event status proposal

All "stop" and "segment" cards must have a status object. All "stop" views must have the "status" object in the stage block next to the other metadata.

The status object would look like the following:

  "status": {
    "code": "post",
 "label": "REPLAY",
dustinrjo /
Last active Aug 29, 2015
adb guide for android testing


  1. On the target device, uninstall the app.
  2. Get the local IP address of the target device.
  3. From dev device join the same local network.
  4. From local device run the following commands

adb kill-server

adb connect

dustinrjo /
Created Mar 31, 2015
Angular JS directive to Maintaining Aspect Ratio for any block level element
app.directive 'aspectRatio', () ->
exports =
scope: {}, # reset scope value to empty between each element otherwise shared ng-repeat pairs will share scope
replace: false, # this keeps the container element on the page
transclude: true, # this wraps the template around the content rather than placing the template inside the content
templateUrl: 'app/directives/aspect-ratio.jade',
link: (scope, elem, attrs) ->
# initialize basic aspect ratio
dustinrjo / Css Example Result
Last active Aug 29, 2015
This is the sample output from a set of Stylus mixins I often use
View Css Example Result
.some-css-scope label {
-webkit-touch-callout: none;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
.some-css-scope nav a {
border: none;

This is an example of how to scaffold API endpoints to list / get / create / update / delete Posts in a Keystone website.

It's a modification of the default project created with the yo keystone generator (see

Gists don't let you specify full paths, so in the project structure the files would be:

routes-index.js        -->    /routes/index.js         // modified to add the api endpoints
routes-api-posts.js    -->    /routes/api/posts.js     // new file containing the Post API route controllers
dustinrjo / angular-carousel-modified.js
Last active Aug 29, 2015
rn-carousel compiled app that works for BH Front End
View angular-carousel-modified.js
View submit form angular gravity
submitForm = ->
formData = jQuery("form", el).serialize()
method: "POST"
url: "/?gf_page=preview&id=1"
data: formData
headers : { 'Content-Type': 'application/x-www-form-urlencoded' }