This file contains 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
require 'benchmark' | |
require 'yaml' | |
def encode(msg, format) | |
case format | |
when :yaml | |
str = msg.to_yaml | |
when :binary | |
str = Marshal.dump(msg) | |
end |
This file contains 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
require 'rubygems' | |
require 'eventmachine' | |
require 'logger' | |
require 'dnssd' | |
# The following gist stops DNSSD from registering a service. On Mac OS X you | |
# can run: | |
# > dns-sd -B | |
# to see services being added and removed. Or altnatively look in Safari's Bonjour | |
# bookmark. When working you'll see a 'BreakDNSSD' service being added, and only |
This file contains 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 iv.collections { | |
import flash.events.IEventDispatcher; | |
import flash.utils.Dictionary; | |
import mx.collections.IList; | |
import mx.events.CollectionEvent; | |
import mx.events.CollectionEventKind; | |
import mx.events.PropertyChangeEvent; | |
This file contains 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 iv { | |
/** | |
* Adds some simple String manipulation doofers that are missing from Flex standard libs | |
* @author grant | |
* | |
*/ | |
public class StringHelper { | |
/** |