Skip to content

Instantly share code, notes, and snippets.

View dustinrjo's full-sized avatar
👋

Dustin Johnson dustinrjo

👋
  • Red Bull
  • United States
View GitHub Profile
@dustinrjo
dustinrjo / evs.md
Last active December 1, 2015 18:35
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
dustinrjo / adb-guide.md
Last active August 29, 2015 14:21
adb guide for android testing

Instructions

  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
dustinrjo / aspect-ratio-directive.coffee
Created March 31, 2015 23:07
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
dustinrjo / Css Example Result
Last active August 29, 2015 14:16
This is the sample output from a set of Stylus mixins I often use
.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 https://github.com/JedWatson/generator-keystone)

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
dustinrjo / angular-carousel-modified.js
Last active August 29, 2015 14:10
rn-carousel compiled app that works for BH Front End
submitForm = ->
formData = jQuery("form", el).serialize()
$http(
method: "POST"
url: "/?gf_page=preview&id=1"
data: formData
headers : { 'Content-Type': 'application/x-www-form-urlencoded' }
).success(submitSuccess)