Skip to content

Instantly share code, notes, and snippets.

View ncrohn's full-sized avatar
🐙

Nick Crohn ncrohn

🐙
View GitHub Profile
### Keybase proof
I hereby claim:
* I am ncrohn on github.
* I am ncrohn (https://keybase.io/ncrohn) on keybase.
* I have a public key whose fingerprint is 1D8B E051 9FF6 09CE C6F6 BF66 BC15 F679 DE83 47B7
To claim this, I am signing this object:
@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"
}
{
indexOf: function(arr, item) {
var ret = -1, i;
for(i=0; i<arr.length; i++) {
if(arr[i] === item) {
ret = i;
break;
}
@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
@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: {
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: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);
});
});
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 ---
Epsilon.ExportMappingDataView = SC.View.extend({
/** @scope Epsilon.ExportMappingDataView.prototype */
content: null,
contentBindingDefault: SC.Binding.multiple(),
render: function(context, firstTime) {
sc_super();
config :some_framework
:required => :your_app
# or this
config 'target/framework'
:required => :your_app
# 'target/framework' would be like 'sproutcore/core_tools'