Skip to content

Instantly share code, notes, and snippets.

View tonylukasavage's full-sized avatar
💭
Learning to make games

Tony Lukasavage tonylukasavage

💭
Learning to make games
View GitHub Profile
@tonylukasavage
tonylukasavage / search.txt
Created May 16, 2014 13:48
Alloy twitter search
((alloy AND appcelerator) OR #tialloy) -Q&A
@tonylukasavage
tonylukasavage / .bash_profile
Last active August 13, 2016 17:28
custom bash prompt for Titanium/Alloy development (and git) Shows the git branch in the current working directory, as well as the Titanium SDK and Alloy version if you are in a Titanium project. The git branch will also show a star (*) next to it if the branch has uncommitted changes. I'm using this with Mac OSX 10.9.1 Terminal and the Droid San…
find-up() {
local path=$(pwd)
while [[ "$path" != "" && ! -e "$path/$1" ]]; do
path=${path%/*}
done
if [ "$path" != "" ]
then
echo "$path"
fi
}
@tonylukasavage
tonylukasavage / .jshintrc
Created January 1, 2014 14:49
.jshintrc file for Titanium + mocha + should
{
"globals": [
"Ti": false,
"Titanium": false,
"Alloy": false,
"describe": false,
"it": false,
"before": false,
"beforeEach": false,
"after": false,
@tonylukasavage
tonylukasavage / README.md
Created April 10, 2013 13:58
My new "license" for my OSS projects

license

Do whatever you want with this code. I offer it without expectation or warranty. No need to credit me in your project or source code. A digital high five would be nice, but is not required.

var oldThis = this;
// If the Ti object were definied in JS like this...
var Ti = {
UI: {
createView: function(args) {
return new Ti.UI.View(args);
},
View: function(args) {
if (!(this instanceof arguments.callee)) {
@k0sukey
k0sukey / alloy.jmk (CoffeeScript)
Created November 17, 2012 13:02
Alloy with CoffeeScript / TypeScript
task("pre:compile", function(event,logger) {
var wrench = require("wrench"),
fs = require("fs"),
path = require("path"),
coffee = require("coffee-script");
event.alloyConfig.coffee = [];
wrench.readdirSyncRecursive(event.dir.home).forEach(function(target){
if (target.match(/\.coffee$/)) {
@tonylukasavage
tonylukasavage / search.txt
Created September 11, 2012 15:10
Alloy twitter search
-shears -fibre -fuselage -shuttle -steel -dental -"heart is titanium alloy" -screwdriver -rust -passion -coupe -"lead foot" -aluminum -aluminium -CSPM -suspension -iron -magnesium -shaft -garage -polished -knit -footwear -racket -rims -silver -metal -metallic -gold -needle alloy -wheel -wheels -cosmetic (mobile OR development OR dev OR controller OR backbone OR mvc OR widget OR appcelerator OR titanium OR framework)
@kwhinnery
kwhinnery / notes.md
Created September 7, 2012 19:03
Kevin's Alloy Notes from Codestrong app

Alloy Notes

Blockers

None

Framework Needs

  • Need attributes for basic logic (if this, show this)
  • Need attribute for not adding something to the view hierarchy automatically
  • Need to use JS in XML attributes - use case: use L() macro for TextField hintText property
@tonylukasavage
tonylukasavage / app.tss
Created August 16, 2012 16:33
revised Alloy controller format
"Window": {
backgroundColor: '#fff'
},
"Label": {
width: Ti.UI.SIZE,
height: Ti.UI.SIZE,
color: "#000",
font: {
fontSize: '32dp'
}
@piscisaureus
piscisaureus / pr.md
Created August 13, 2012 16:12
Checkout github pull requests locally

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = git@github.com:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this: