These instructions install ruby and rubygems from source, not from RPMs. For instructions on installing from RPMs, look at something like http://wiki.opscode.com/display/chef/Installation+on+RHEL+and+CentOS+5+with+RPMs or http://mykestubbs.com/blog/2010/03/chef-installation-on-centos-54.html
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.robotlegs.adapters | |
{ | |
import flash.system.ApplicationDomain; | |
import org.robotlegs.core.IInjector; | |
import uk.co.ziazoo.injector.IInjector; | |
import uk.co.ziazoo.injector.impl.Injector; | |
public class DawnInjector implements org.robotlegs.core.IInjector |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// IMediaRenderer.as | |
package example | |
{ | |
public interface IMediaRenderer extends IDataRenderer, IUsesResources, IUsesPermissions | |
{ | |
} | |
} | |
// MediaRenderer.as | |
package example |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
protected var _foo:String; | |
[Bindable( "fooChanged" )] | |
public function get foo():String | |
{ | |
return _foo; | |
} | |
public function setFoo( foo:String ):void | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Function.prototype.or = function(callback) { | |
var next = this; | |
return function(err, doc) { | |
if (err) { | |
callback(err, doc); | |
} else { | |
next(doc, callback); | |
} | |
}; | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
A view Class to mediator Class mapping means that there may be multiple mediator instances for a given view type. How would RL know which instance to inject? | |
mediatorMap.mapView(SomeView, SomeMediator); | |
.. | |
addChild(new SomeView()); | |
addChild(new SomeView()); | |
addChild(new SomeView()); | |
.. | |
[Inject] | |
public var view:SomeMediator; // which one of the 3 mediator instances should we inject? it makes no sense. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// originally from Andy Shang http://bbs.9ria.com/viewthread.php?tid=47399 | |
package | |
{ | |
import flash.display.Sprite; | |
public class AOPTest extends Sprite | |
{ | |
public function AOPTest() | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# I want to add DynamicClass.some_method, not DynamicClass.new.some_method, so.. | |
class DynamicClass | |
@@syms = [] | |
def self.metaclass | |
class << self; self; end | |
end | |
def self.add_method(sym) | |
@@syms.push(sym) unless @@syms.include?(sym) | |
metaclass.instance_eval do |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<meta name="viewport" content="width=device-width, initial-scale=1.0, | |
minimum-scale=1.0, maximum-scale=1.0, user-scalable=no, | |
target-densitydpi=device-dpi"/> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// In AS3 | |
a ||= value; | |
// is shorthand for: | |
if (a == false) { // 1: Tests truthiness, not strict null | |
a = value; | |
} else { | |
a = a; // 2: Will reassign |