Skip to content

Instantly share code, notes, and snippets.

@lamberta
lamberta / AS3Flex.mxml
Created April 16, 2010 03:58
BouncingBall AS3Flex demo
<mx:Application
xmlns:mx="http://www.adobe.com/2006/mxml"
width="450" height="350"
layout="vertical"
verticalAlign="middle"
horizontalAlign="center"
verticalScrollPolicy="off"
horizontalScrollPolicy="off"
applicationComplete="{initApp()}">
Error #1009: Cannot access a property or method
of a null object reference.
@lamberta
lamberta / TextWithVelocity.as
Created April 16, 2010 01:08
LetterFountain.as demo
/**
* TextWithVelocity, Billy Lamberta.
* Extended textfield, with added variables to hold a velocity value.
* */
//need to put the package directory structure here
package {
import flash.text.TextField;
public class TextWithVelocity extends TextField {
@lamberta
lamberta / gist:368010
Created April 16, 2010 04:34
pv3d materials sample
<instance_material symbol="lambert1SG" target="#myShaderName"/>
@lamberta
lamberta / beejay.py
Created April 16, 2010 02:46
beejay.py
#!/usr/bin/env python
##
## -- 'beejay' is Billy's Jukebox --
## -- Copyright 2008 Billy Lamberta --
##
## Read and sort an iTunes generated playlist to use with a
## command-line audio player like 'mplayer' or 'mpg123'.
##
## Requires the 'Plistlib' library, which is available here:
## http://svn.red-bean.com/bob/plistlib/trunk/plistlib.py
@lamberta
lamberta / gist:367948
Created April 16, 2010 02:58
beejay command-line options
-v version and program information
-p file open an iTunes formatted playlist
-r random mode (shuffle)
-t turn off track numbers
-d use the default library
-o file output a M3U formatted playlist (use with --print)
--print print playlist to screen without playing
--no-see don't print song info to screen
--player=program use a different media player
@lamberta
lamberta / gist:367959
Created April 16, 2010 03:06
Mathematica emacs keybindings
(* My Emacs KeyBindings *)
Item[KeyEvent["a", Modifiers -> {Control}], "MoveLineBeginning"],
Item[KeyEvent["e", Modifiers -> {Control}], "MoveLineEnd"],
Item[KeyEvent["Home"],
FrontEndExecute[{
FrontEnd`SelectionMove[FrontEnd`InputNotebook[], Before, Notebook],
FrontEnd`FrontEndToken["ScrollNotebookStart"]
}]],
Item[KeyEvent["End"],
FrontEndExecute[{
@lamberta
lamberta / SeeInvisible.as
Created April 16, 2010 04:21
See-Invisible pv3d demo
/**
* To see the demo and a writeup, visit:
* http://lamberta.posterous.com/3d-flash-demo-see-through
*
* This software is release under the MIT License.
* Copyright (c) Billy Lamberta, 2008
* www.lamberta.org
*
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
@lamberta
lamberta / gist:368098
Created April 16, 2010 06:33
Doodle.js v0.1 web examples
var cx = oo.canvas().width/2;
var cy = oo.canvas().height/2;
var img_w = 271;
var img_h = 365;
var img = oo.image({src:'./img/face_271x365.png',
x:cx - img_w/2,
y:cy - img_h/2,
axis:{x:img_w/2,
y:img_h/2,
coord:'local',
set path="C:\WINDOWS\system32;C:\usr\local\python_2-4-4\;C:\usr\local\python_2-4-4\Tools\Scripts\;"
"C:\Program Files\FontLab\Studio5\Studio5.exe"