Skip to content

Instantly share code, notes, and snippets.

View ncrohn's full-sized avatar
🐙

Nick Crohn ncrohn

🐙
View GitHub Profile
<!-- With theme included -->
<link href="/static/sproutcore/standard_theme/en/current/stylesheet.css?1264724547" rel="stylesheet" type="text/css" />
<link href="/static/sproutcore/testing/en/current/stylesheet.css?1264724546" rel="stylesheet" type="text/css" />
<link href="/static/sproutcore/foundation/en/current/stylesheet.css?1264724546" rel="stylesheet" type="text/css" />
<link href="/static/sproutcore/desktop/en/current/stylesheet.css?1264724546" rel="stylesheet" type="text/css" />
<link href="/static/epsilon_theme/en/current/stylesheet.css?1265305781" rel="stylesheet" type="text/css" />
<!-- Without theme included -->
config :some_framework
:required => :your_app
# or this
config 'target/framework'
:required => :your_app
# 'target/framework' would be like 'sproutcore/core_tools'
Epsilon.ExportMappingDataView = SC.View.extend({
/** @scope Epsilon.ExportMappingDataView.prototype */
content: null,
contentBindingDefault: SC.Binding.multiple(),
render: function(context, firstTime) {
sc_super();
SC.View.design(SC.Animatable, {
layout: { top: 20+(25*i), right: 0, left: 20, height: 25 },
transitions: {
height: { duration: .25, timing: SC.Animatable.TRANSITION_EASE_IN_OUT }
}
//--- more code ---
//--- in render method ---
@ncrohn
ncrohn / gist:1145303
Created August 14, 2011 21:00
Usage for CzechBox
$(document).ready(function() {
var inputs = $("input[type='checkbox']");
inputs.each(function(idx, item) {
new CzechBox(item);
});
});
function reroute(func, context) {
return function() {
var args = arguments;
args.push(this);
func.apply(context, args);
};
}
socket.on('windowCreated', reroute(this.windowCreated, this));
@ncrohn
ncrohn / gist:2422972
Created April 19, 2012 18:51
Example Grunt File for Marketing
module.exports = function(grunt) {
grunt.initConfig({
lint: {
bundle: ['bundles/**/common/src/**/site/lib/**/*.js']
},
jshint: {
options: {
@ncrohn
ncrohn / NickCrohn.js
Created August 12, 2012 17:53
Myself as a JavaScript Class
var NickCrohn = function(world) {
var firstName = 'Nicholas',
middleName = 'William',
lastName = 'Crohn',
favoriteFood = {
name: 'Lasagna',
isFood: true,
isDrink: false
{
indexOf: function(arr, item) {
var ret = -1, i;
for(i=0; i<arr.length; i++) {
if(arr[i] === item) {
ret = i;
break;
}
@ncrohn
ncrohn / consumer-registry.json
Last active December 12, 2015 08:18
Node.js real-time remote services
{
"name": "consumer-name",
"version": "1.0.0"
}