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 fileName = 'a' | |
| var fs = require('fs'); | |
| var file = fs.readFileSync(fileName).toString(); | |
| var re = /\((\d*)ms\)/mg; | |
| var result = []; | |
| while(ret = re.exec(file)) { | |
| result.push(+ret[1]); | |
| re.lastIndex = ret.index + 1; | |
| } |
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
| [INFO] Scanning for projects... | |
| [INFO] ------------------------------------------------------------------------ | |
| [INFO] Reactor Build Order: | |
| [INFO] | |
| [INFO] Vibe Java Server Parent | |
| [INFO] Vibe Java Server | |
| [INFO] | |
| [INFO] ------------------------------------------------------------------------ | |
| [INFO] Building Vibe Java Server Parent 3.0.0-Alpha1-SNAPSHOT | |
| [INFO] ------------------------------------------------------------------------ |
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.atmosphere.vibe.server; | |
| import java.io.File; | |
| import java.io.IOException; | |
| import java.util.Collections; | |
| import java.util.Map; | |
| import java.util.Set; | |
| import java.util.concurrent.ConcurrentHashMap; | |
| import javax.servlet.ServletContainerInitializer; |
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
| Donghwan@DONGHWAN ~/Documents/GitHub/vibe (master) | |
| $ mvn test | |
| [INFO] Scanning for projects... | |
| [INFO] ------------------------------------------------------------------------ | |
| [INFO] Reactor Build Order: | |
| [INFO] | |
| [INFO] Vibe Java Server | |
| [INFO] vibe | |
| [INFO] | |
| [INFO] ------------------------------------------------------------------------ |
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
| Donghwan@DONGHWAN ~/Documents/GitHub/vibe-javascript-client (master) | |
| $ npm test | |
| > vibe-client@3.0.0-Alpha1 test c:\Users\Donghwan\Documents\GitHub\vibe-javascript-client | |
| > grunt test | |
| Running "test-node" task | |
| client |
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
| // Open a console in https://saucelabs.com/ and type this script | |
| var username = "vibe"; | |
| $.ajax("/rest/v1/" + username + "/jobs").done(function(array) { | |
| (function remove(id) { | |
| $.ajax("/rest/v1/" + username + "/jobs/" + id, {type: "DELETE"}) | |
| .done(function() { | |
| if (array.length) { | |
| remove(array.shift().id); | |
| } else { | |
| console.log("done"); |
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
| declare module react { | |
| export function open(uri: string, options?: SocketOptions): Socket; | |
| interface SocketOptions { | |
| transports?: string[]; | |
| timeout?: any; | |
| heartbeat?: any; | |
| sharing?: boolean; | |
| reconnect? (lastDelay: number, attempts: number): any; | |
| xdrURL? (url: string): string; |
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
| // Java 7 | |
| server.byTag("admin", new Action<Socket>() { | |
| @Override | |
| public void on(Socket socket) { | |
| socket.send("message", "you're fired")); | |
| } | |
| }); | |
| // or using sentence | |
| server.byTag("admin").send("message", "you're fired"); |
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
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8"> | |
| <title>JS Bin</title> | |
| </head> | |
| <body> | |
| <script src="http://atmosphere.github.io/react/javascript-client/3.0.0-Alpha1/react.js"></script> | |
| </script> | |
| </body> |
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
| import io.react.runtime.DefaultServer; | |
| import io.react.runtime.Server; | |
| import io.react.vertx.VertxServerHttpExchange; | |
| import io.react.vertx.VertxServerWebSocket; | |
| import java.io.IOException; | |
| import org.vertx.java.core.Vertx; | |
| import org.vertx.java.core.VertxFactory; |