Skip to content

Instantly share code, notes, and snippets.

View gorhgorh's full-sized avatar

Jérôme Zhang gorhgorh

View GitHub Profile
define([
'coreJS/adapt',
'coreViews/menuView'
], function(Adapt, MenuView) {
var BoxMenuView = MenuView.extend({
events: {
'click .platformBt' : 'onClickPlatformButton'
},

Keybase proof

I hereby claim:

  • I am gorhgorh on github.
  • I am gorhgorh (https://keybase.io/gorhgorh) on keybase.
  • I have a public key whose fingerprint is 023C 64F8 79A9 32C3 84B3 A3DE 15BD 341F 5430 B83D

To claim this, I am signing this object:

@gorhgorh
gorhgorh / course.json
Created October 5, 2015 11:20
navigation object to add the close extention
"_navigation":{
"_extensions": {
"_close": {
"_isEnabled": true,
"_iconTypeClass": "icon-cross",
"tooltip": "Close",
"_showTooltip": true,
"_layout": "right",
"_promptIfIncomplete": null,
@gorhgorh
gorhgorh / config.json
Last active August 29, 2015 14:28
simple novce version check vs required version (could be used to check adapt's min version vs current one)
{
"_maxNodeVer": "0.10.33",
"_defaultLanguage": "en",
"_defaultDirection": "ltr",
"_questionWeight": 1,
"_accessibility": {
"_isEnabled": true,
"_shouldSupportLegacyBrowsers": true,
"_isTextProcessorEnabled": true
},
@gorhgorh
gorhgorh / gist:313a588a063ad516a61c
Created August 23, 2015 11:26
adapt install process output
$ adapt create course
Confirm type (course)
Confirm name (my-adapt-course) catbot
Confirm branch (master)
Confirm create now? (y)
downloading framework to catbot done!
installing node dependencies
npm ERR! fetch failed https://registry.npmjs.org/gzip-size/-/gzip-size-0.1.1.tgz
npm WARN retry will retry, error on last attempt: Error: socket hang up
npm ERR! fetch failed https://registry.npmjs.org/zlib-browserify/-/zlib-browserify-0.0.3.tgz
var SensorTag = require('sensortag');
console.log("looking for a sensorTag");
SensorTag.discover(function(sensorTag) {
console.log("found one");
sensorTag.connect(function() {
console.log("connected to sensortag");
sensorTag.discoverServicesAndCharacteristics(function() {
console.log("characteristics discovered");

Keybase proof

I hereby claim:

  • I am gorhgorh on github.
  • I am gorhgorh (https://keybase.io/gorhgorh) on keybase.
  • I have a public key whose fingerprint is 58E3 7E45 C967 4D37 D395 6EB7 0629 7DF8 0DCB 26D3

To claim this, I am signing this object:

//-----------------------------------------------//
// SPARK CORE SIMPLE TONE GENERATOR //
//===============================================//
// Copy this into a new application at: //
// https://www.spark.io/build and go nuts! //
//-----------------------------------------------//
// Technobly / BDub - Jan 2014 //
//===============================================//
#define NOTE_B2 4065
@gorhgorh
gorhgorh / mdnLive.sublime-snippet
Created March 9, 2014 15:15
snippet to generate markup tio insert a live exemple in mdn documentation
<snippet>
<content><![CDATA[
<h2 name="$1">$1</h2>
<h3>HTML</h3>
<pre class="brush: html">
${2:Sample HTML Content}</pre>
<h3>CSS</h3>
<pre class="brush: css">
${3:Sample CSS Content}</pre>
<h3>JavaScript</h3>
@gorhgorh
gorhgorh / modernizrLeap.js
Last active August 29, 2015 13:56
Modernizr test for leap motion
function checkLeap () {
// Hard dependency on websockets; quick exit if not supported
if (!Modernizr.websockets) {
Modernizr.addTest('leap', false);
}
// Try and connect to the leap daemon
var ws = new WebSocket("ws://localhost:6437/");
ws.onopen = function(event) {
Modernizr.addTest('leap', true);