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
#!/usr/local/bin/ruby | |
# | |
# IRC Client Example | |
require "socket" | |
# Don't allow use of "tainted" data by potentially dangerous operations | |
$SAFE=1 | |
# The irc class, which talks to the server and holds the main event loop |
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
//// | |
//// OpenGL based server that streams images to screen from multiple clients | |
//// maybe someone can use this / have fun playing with it | |
using System; | |
using System.Text; | |
using System.Collections; | |
using System.Threading; | |
using System.IO; | |
using System.Net.Sockets; |
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
# make on_collision_with() | |
def self.register_collision_classes | |
result = instance_methods.grep(/^#{COLLISION_HANDLER_PREFIX}/).map do |method_name| | |
name_of_handled = method_name[/^#{COLLISION_HANDLER_PREFIX}_?(.*)/,1] | |
Game.referee.track(self.underscore_name,name_of_handled.empty? ? :any : name_of_handled) | |
end | |
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
# apache 2 mod_rewrite no infinite redirect loops | |
RewriteEngine on | |
# still keep /static folder | |
RewriteCond %(REQUEST_URI) !^(\/static) [NC] | |
# don't rewrite index.html (prevents infinite loop) | |
RewriteRule !index\.html - [C] | |
# rewrite everything to index | |
RewriteRule .* /index.html [R] |
OlderNewer