Skip to content

Instantly share code, notes, and snippets.

View nickjs's full-sized avatar

Nicholas J. Small nickjs

View GitHub Profile
/*
* LAMenu.j
* LayoutKit
*
* Created by Nicholas Small.
* Copyright 2008, Nicholas Small.
*/
@import <Foundation/CPObject.j>
@import <AppKit/CPMenu.j>
@import "NodePanel.j"
@implementation AppController : CPObject
{
}
- (void)applicationDidFinishLaunching:(CPNotification)aNotification
{
var node = {
/*
* CPPropertyAnimation.j
* AppKit
*
* Created by Nicholas Small.
* Copyright 2008, Nicholas Small.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
@nickjs
nickjs / CPNavigationBar.j
Created July 30, 2009 16:09
CPNavigationController & CPViewController
/*
* CPNavigationBar.j
* AppKit
*
* Created by Nicholas Small.
* Copyright 2009, 280 North, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
@nickjs
nickjs / gist:6999202
Last active December 25, 2015 15:38 — forked from benjskim/gist:6999177
$(function() {
var aboutTextIsExpanded = false;
$(".moreabout").click(function(){
$(".moreabouttext").slideToggle();
if (aboutTextIsExpanded)
$(".moreabout").text("Read Less");
else
$(".moreabout").text("Read More");
});
});
{
"bold_folder_labels": true,
"color_scheme": "Packages/User/Espresso Soda.tmTheme",
"ensure_newline_at_eof_on_save": true,
"fade_fold_buttons": false,
"font_face": "Mensch",
"font_size": 26.0,
"highlight_line": true,
"highlight_modified_tabs": true,
"ignored_packages":
@nickjs
nickjs / CHANGELOG.md
Last active December 13, 2015 18:48
batman.js 0.14.0 changelog

https://github.com/Shopify/batman/compare/v0.13.0...master

APP

  • Added: App.shouldAllowEvent.[event]. Callbacks in this hash will be called whenever the corresponding data-event is fired from anywhere within the app. Return false to prevent app-level propagation. For example:
class MyApp extends Batman.App
  @shouldAllowEvent.click = (event) ->
    return false
@nickjs
nickjs / stupid.js
Created June 7, 2012 07:06
Infinite Picture Generator
(function() {
var canvas = document.getElementById('canvas');
var MAX_ROWS = canvas.height;
var MAX_COLS = canvas.width;
var code = "var context = document.getElementById('canvas').getContext('2d');var color;\n";
var magicNumber = 255/5;
var pixelCount = 0;
class Shopify.ProductsIndexView extends Batman.View
# should be YourApp.ControllerActionView
ready: ->
$('span').slider()
@nickjs
nickjs / uselessthing.coffee
Created September 20, 2011 22:40
A totally useless way to use CoffeeScript
c = (obj) ->
(callback) ->
callback.call(obj)
foo = c 'bar'
alert foo -> @length
random = c foo: c 'bar'
alert random -> @foo -> @[0]