Skip to content

Instantly share code, notes, and snippets.

View timoxley's full-sized avatar

Tim Kevin Oxley timoxley

View GitHub Profile
<?xml version="1.0" encoding="utf-8"?>
<project name="Flare" basedir="." default="compile">
<property environment="env" />
<property name="FLEX_HOME" value="${env.FLEX_HOME}"/>
<property name="SRC_FOLDER" value="${basedir}/src"/>
<property name="LIBS_FOLDER" value="${basedir}/libs"/>
<property name="OUTPUT_FOLDER" value="${basedir}/bin"/>
<property name="REPORT_FOLDER" value="${basedir}/report"/>
<?xml version="1.0" encoding="utf-8"?>
<project name="Flare" basedir="." default="compile">
<property environment="env" />
<property name="FLEX_HOME" value="${env.FLEX_HOME}"/>
<property name="SRC_FOLDER" value="${basedir}/src"/>
<property name="LIBS_FOLDER" value="${basedir}/libs"/>
<property name="OUTPUT_FOLDER" value="${basedir}/bin"/>
<property name="REPORT_FOLDER" value="${basedir}/report"/>
<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/halo"
minWidth="1024"
minHeight="768"
creationComplete="application1_creationCompleteHandler(event)">
<fx:Declarations>
<!-- Place non-visual elements (e.g., services, value objects) here -->
</fx:Declarations>
<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/halo"
minWidth="1024"
minHeight="768"
creationComplete="clockhand1_creationCompleteHandler(event)">
<fx:Script>
<![CDATA[
import mx.events.FlexEvent;
<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/halo"
minWidth="1024"
minHeight="768"
creationComplete="application1_creationCompleteHandler(event)">
<fx:Script>
<![CDATA[
import mx.events.FlexEvent;
@timoxley
timoxley / Copy Keys
Created May 10, 2011 05:05
Scalr Script: Append pubkey to authorized keys file for a provided user.
#!/bin/bash
USER="%user%"
KEY="%key%"
FILE="%file%"
if [[ ! -n "$KEY" ]]; then
KEY="INSERT YOUR DEFAULT PUBLIC KEY HERE"
fi
@timoxley
timoxley / gist:973240
Created May 15, 2011 15:28
nodejs friendly .bash_profile
PATH=$PATH:/usr/local/share/npm/bin
PATH=/usr/local/bin/:$PATH
PATH=/usr/local/sbin:$PATH
export PATH
export NODE_PATH="/usr/local/lib/node"
├─┬ [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ └── [email protected]
├── [email protected]
├── [email protected]
├─┬ [email protected]
│ └── [email protected]
├── [email protected]
├── [email protected]
@timoxley
timoxley / index.js
Created June 5, 2011 12:53
compress 'stitched' code and cache as file
package.compile(function (err, source) {
var jsp = require("uglify-js").parser;
var pro = require("uglify-js").uglify;
var ast = jsp.parse(source); // parse code and get the initial AST
ast = pro.ast_mangle(ast); // get a new AST with mangled names
ast = pro.ast_squeeze(ast); // get an AST with compression optimizations
var final_code = pro.gen_code(ast); // compressed code here
fs.writeFile(__dirname + '/public/scripts/application.js', final_code, function (err) {
if (err) throw err;
util.puts('Compiled application.js');
@timoxley
timoxley / js-bundler.coffee
Created July 20, 2011 05:42
Bundle all js files in ./scripts to ./application.js using Stitch
argv = process.argv.slice(2)
stitch = require('stitch')
fs = require('fs')
mode = argv[0] || "DEV"
package = stitch.createPackage
paths: [__dirname + '/scripts']