Skip to content

Instantly share code, notes, and snippets.

Dustin Johnson dustinrjo

Block or report user

Report or block dustinrjo

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
@dustinrjo
dustinrjo / evs.md
Last active Dec 1, 2015
event status proposal
View evs.md

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 Aug 29, 2015
adb guide for android testing
View adb-guide.md

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 <target device ip with port number>

@dustinrjo
dustinrjo / aspect-ratio-directive.coffee
Created Mar 31, 2015
Angular JS directive to Maintaining Aspect Ratio for any block level element
View aspect-ratio-directive.coffee
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 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;
View KeystoneApiExample.md

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 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()
$http(
method: "POST"
url: "/?gf_page=preview&id=1"
data: formData
headers : { 'Content-Type': 'application/x-www-form-urlencoded' }
).success(submitSuccess)
You can’t perform that action at this time.