Skip to content

Instantly share code, notes, and snippets.

View lightsofapollo's full-sized avatar

James Lal lightsofapollo

View GitHub Profile
/**
Settings
- Special Case
- Always rendered
- Silently updated
- When Active eats back events.
Display
- STATES
- Month
@lightsofapollo
lightsofapollo / assets.md
Created July 11, 2012 15:59
Gaia CSS Packaging proposal

App Level Instruction File

Each app may have one assets.json under their main root. Asset file is indexed by its html "target" apps may have multiple html targets where references to css will eventually be updated.

During production (running make) assets will be built and hard-coded into each target. During development assets will be loaded on demand without processing (concatenation, minify, etc...)

@lightsofapollo
lightsofapollo / ical.js
Created July 25, 2012 20:27
ICAL bikeshed
// some ical string;
var rawIcalString;
// my ical data - remove decorate parameter
var data = ICAL.parse(rawIcalString);
var component = new ICAL.Component(data);
// later I store it in the DB
var structuredCloneData;
@lightsofapollo
lightsofapollo / steps.sh
Created August 31, 2012 18:15
Steps for checking out repo
# 1. you need to add a remote
git remote add lightsofapollo git://github.com/lightsofapollo/gaia.git
# 2. fetch branches
git fetch lightsofapollo
# 3. Assuming your on head create a new working branch (the new branch will be test-some-crazy-calendar-stuff)
@lightsofapollo
lightsofapollo / reload.js
Created September 11, 2012 00:13
Reload app in marionette
navigator.mozPower.screenEnabled = true;
var WindowManager = window.wrappedJSObject.WindowManager;
var currentApp = WindowManager.getDisplayedApp();
if (currentApp) {
WindowManager.kill(currentApp);
}
WindowManager.launch(currentApp);
var container = new Rules('YEARLY', {
until: foo,
count: bar,
interval: xx
});
var byDay = new ByDay(['1SU']);
var byMonthDay = new ByMonthDay(15);
container.filter(byDay, byMonthDay)
// Post parser
// COMPONENT OR STRING
//SAX?
var builder = ICAL.Builder({ /* options */ });
builder.onitem = function() {
};
// Post parser
// COMPONENT OR STRING
//SAX?
var builder = ICAL.Builder({ /* options */ });
builder.onitem = function() {
};
@lightsofapollo
lightsofapollo / README.md
Created October 7, 2012 04:29
Strapdown + Github README.md viewer

Quick hack that uses github v3 api to get the README.md from a project and display its readme using strapdown.

requireApp('system/js/identity.js');
requireApp('system/test/unit/mock_chrome_event.js');
requireApp('system/test/unit/mock_popup_manager.js');
// ensure its defined as a global so mocha will not complain about us
// leaking new global variables during the test
if (!window.PopupManager) {
window.PopupManager = true;
}