Skip to content

Instantly share code, notes, and snippets.

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Crash IE6 + IE7</title>
<!--[if IE 6]>
<script>
for (x in document.write) {
document.write(x);
}
// RATER MODULE for Appcelerator Titanium
/*
WHAT IS IT:
Create a cycling reminder to go rate your app at the App Store. Tracks
the app launch count, and reminds the user every 20 launches (configurable) to
rate the app, with a click to launch the app page in the App Store.
Reminders stop if the user clicks the "Rate Now" or "Don't Remind Me" options.
USAGE:
@joemaffia
joemaffia / app.js
Created March 24, 2011 18:16
foursquare OAuth in Titanium
/**
*
*
* Copyright 2011 Aaron K. Saunders, Clearly Innovative Inc
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>
@joemaffia
joemaffia / mCache.js
Created December 12, 2011 11:39
A cache module for Titanium
/***************************************************
Titanium mCache
Joe Maffia
http://about.me/joemaffia
A cache module to be used for Titanium app. http://www.appcelerator.com/
It uses the local SQLite database to cache strings and JavaScript objects.
Usage:
@joemaffia
joemaffia / app.js
Created January 22, 2012 15:04 — forked from pec1985/app.js
LinkedIn effect - Titanium
// right navigation button
var btn = Ti.UI.createButton({
title:'button'
});
// window
var win = Ti.UI.createWindow({
rightNavButton:btn,
backgroundColor:'blue'
});
@joemaffia
joemaffia / environment.md
Last active December 12, 2015 02:49
Sublime PATH problem

The PATH exposed to GUI apps in OSX is determined by what it's set in ~/.MacOSX/environment.plist

You can see what PATH Sublime is getting from OSX by opening Sublime's console (control-tick) and typing:

import os
os.environ['PATH']

If you don't have that file/folder just create it.

@joemaffia
joemaffia / mac-account.md
Last active December 15, 2015 04:19
Mac locked with password

Boot in single user mode

Command+s

Run

This method tricks OSX into thinking the computer it’s brand new and leads you through the setup to create a new administrator account.

Mount -uw /

Rm /var/db/.AppleSetupDone

@joemaffia
joemaffia / app.js
Last active December 18, 2015 12:19 — forked from viezel/app.js
Codebird for Appcelerator Titanium. Using the Twitter API 1.1
// This is an example of use.
// Here we use the new Bearer Token thats make it possible to get tweets without user login
// More info on Bearer here: https://dev.twitter.com/docs/auth/application-only-auth
// Full Codebird API is here: https://github.com/mynetx/codebird-js
var Codebird = require("codebird");
var cb = new Codebird();
cb.setConsumerKey('CONSUMER_KEY', 'CONSUMER_SECRET_KEY');
var bearerToken = Ti.App.Properties.getString('TwitterBearerToken', null);
@joemaffia
joemaffia / GoodbyeWorldTag.java
Last active December 25, 2015 16:19
Adobe CQ JSP Custom Tag
package com.company.cq.taglib;
import com.cqblueprints.taglib.CqSimpleTagSupport;
import com.squeakysand.jsp.tagext.annotations.JspTag;
import com.squeakysand.jsp.tagext.annotations.JspTagAttribute;
import com.englishtown.cq.b2c.services.GoodbyeWorldService;
import java.io.IOException;