Skip to content

Instantly share code, notes, and snippets.

View joubertnel's full-sized avatar

Joubert Nel joubertnel

  • Netflix
  • Los Angeles, CA
View GitHub Profile
SC.routes.add(‘notes/:id’, function(routingArgs) {
MyApp.statechart.gotoState(’showTakeNotesView’, 'showBooksView’);
});
SC.routes.add(‘notes/:id’, function(routingArgs) {
MyApp.statechart.gotoStateFromFirstSiblingCurrentState('showingTakeNotesView', 'appFlow', 'showingNothing');
});
$theme.slider .sc-handle { /* the knob */
background-image: sc_static('images/knob.png') !important;
@media (-webkit-min-device-pixel-ratio:2) {
background-image: sc_static('images/knob_retna.png') !important;
background-size: 16px 18px;
}
&.active {
background-image: sc_static('images/knob_active.png') !important;
@joubertnel
joubertnel / gist:1327495
Created October 31, 2011 13:36
PhantomJS script for test automation of SproutCore app
var allTestsURL = "http://localhost:4020/reader_core/en/current/tests.html";
var failedItem;
var failureCount;
var failureMessage;
var failures;
var i, j;
var reportingDone = false;
var specDescription;
var specs;
@joubertnel
joubertnel / video.js
Created November 3, 2011 14:57
HTML5 video in SproutCore
SC.Video = SC.View.extend({
classNames: ['sc-video'],
tagName: 'video',
attributeBindings: ['src', 'width', 'height', 'controls', 'type', 'currentTime', 'initialTime'],
currentTime: 0,
/// Setup
didInsertElement: function() {
var self = this;
@joubertnel
joubertnel / video.handlebars
Created November 3, 2011 14:59
HTML5 video in Handlebars
<div class="videoPod large">
{{view SC.Video srcBinding="MyApp.watchController.video.url"
currentTimeBinding="MyApp.watchController.scrubPosition"
width="500" height="340"
controls="controls" type="video/mp4" }}
<br/>
{{MyApp.watchController.video.title}}
</div>
;;; This was installed by package-install.el.
;;; This provides support for the package system and
;;; interfacing with ELPA, the package archive.
;;; Move this code earlier if you want to reference
;;; packages in your .emacs.
(when
(load
(expand-file-name "~/.emacs.d/elpa/package.el"))
(package-initialize))
(add-to-list 'load-path "~/.emacs.d/color-theme/")
(require 'color-theme)
;; Colorization
(color-theme-initialize)
;(color-theme-gtk-ide)
;(color-theme-blippblopp)
;(color-theme-andreas)
;(color-theme-blue-mood)
@joubertnel
joubertnel / gist:1502349
Created December 20, 2011 17:11
SproutCore isDefault button bound to whether a group hasFirstResponder status
// ==========================================================================
// Project: ReturnRouting - mainPage
// Copyright: @2011 My Company, Inc.
// ==========================================================================
/*globals ReturnRouting */
ReturnRouting.SelectView = SC.SelectView.extend({
/*
If the user presses the Return key, instead of showing the
@joubertnel
joubertnel / buildjs.json
Created January 10, 2012 10:16
buildjs.json for ember-metal
{
"build_dir": "build",
"app_file": "build/ember-metal.js",
"src": [ "lib/core.js",
"lib/platform.js",
"lib/utils.js",
"lib/accessors.js",
"lib/properties.js",
"lib/computed.js",