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
| require 'socket' | |
| server = TCPServer.new("127.0.0.1", 9000) | |
| loop do | |
| socket = server.accept | |
| while socket.gets.chop.length > 0 | |
| end | |
| socket.puts "HTTP/1.1 200 OK" | |
| socket.puts "Content-type: text/html" | |
| socket.puts "" | |
| socket.puts "<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
| module Java | |
| class VM | |
| def run(classname, options) | |
| puts "original version" | |
| end | |
| end | |
| end | |
| Java::VM.new.run "blah", "blah" |
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
| require 'rubygems' | |
| require 'eventmachine' | |
| module Server | |
| def receive_data data | |
| send_data "HTTP/1.1 200 OK\n\r\n\rHello World" | |
| close_connection_after_writing | |
| end | |
| end | |
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
| ([][(![]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]+(!![]+[])[+[]]][([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[+!+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[!+[]+!+[]]]()[(![]+[])[+!+[]]+(![]+[])[!+[]+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]+(!![]+[])[+[]]])([][(![]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]+(!![]+[])[+[]]][([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[+!+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[!+[]+!+[]]]()[(![]+[])[+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[ |
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 draw(){ | |
| a(); | |
| new Image.. | |
| b(); | |
| c(); | |
| new Image.. | |
| d(); | |
| } | |
| -- transform to --> |
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
| /* | |
| Javascript port of CubicVR 3D engine for WebGL | |
| by Charles J. Cliffe | |
| http://www.cubicvr.org/ | |
| May be used under the terms of LGPL v3.0 or greater. | |
| */ | |
| var CubicVR = null; | |
| var CubicVR_GLCore = new Object(); |
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
| void mouseReleased() { | |
| if ( SHOW_SEQUENCER ) { | |
| // Plot notes in sequencer | |
| var col = parseInt(mouseX / (width/32)); | |
| var row = parseInt(mouseY / (height/24)); | |
| if(window.synth != null){ | |
| window.synth.setNote(col,row,!sequencer[col][row]); | |
| } else { | |
| sequencer[col][row] = !sequencer[col][row]; | |
| } |
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(){ | |
| var SharedKeyValueStore = function(){ | |
| return { | |
| attr: function(key, value, callback){ | |
| // usage: | |
| // | |
| // set: | |
| // kvstore.attr("price",9.99,function(){...}); | |
| // |
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
| var P = function(x){ | |
| this.x = x; | |
| }; | |
| P.prototype.blah = function(){ | |
| }; | |
| var test = new P(7); | |
| (test instanceof P) && (P==test.constructor) |
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
| var code = 7; | |
| // fn returns a handler with code as local 'secret' | |
| var handler = (function(secret){ | |
| // return handler | |
| return function(e){ | |
| self.setValue($(this).val() + secret); | |
| } | |
| })(code); |