- Ruby
- Java/Groovy/Scala
- http://www.playframework.com/
- http://scooterlabs.com/echo
- https://github.com/bcantoni/echotest
curl -X POST -H "Content-Type: application/json" -d '{"foo":"bar"}' http://scooterlabs.com/echo.json
- http://respondto.it/
- http://requestb.in/
- http://httpbin.org/
- http://www.jsontest.com/
First, go to stackoverflow.com then define this in your Javascript console:
var hackMeSomeUnicoins = function(myFkey) {
console.log("Ok, let's hack you some shiny unicoins! <3 /dev/alias (www.devalias.net)")
console.log("The powers that be say you can only mine a rock every 10sec, so we do it every 11sec to be sure.")
window.setInterval(function(){
$.get( "http://stackoverflow.com/unicoin/rock", function( data ) {
var rockId = data.rock;
$.post( "http://stackoverflow.com/unicoin/mine?rock=" + rockId, { fkey: myFkey })
.done(function( data ) {
- This is mostly a note for me to help save a TON of time screwing around again.
- Play 2.2.x works 'out of the box' just by including lombok in your dependencies
libraryDependencies ++= Seq(
foo,
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
// TODO: Example code for accessing variables/etc in annotations. | |
// TODO: Could this be done nicely with a 'map' type functional extraction? | |
Method m; | |
try | |
{ | |
m = Class.forName("MyClass").getMethod("someMethod"); // Class/method that are annotated | |
MyAnnotation a = m.getAnnotation(MyAnnotation.class); // Annotation class | |
String someString = a.aStringMethod(); // Thing we want to access | |
} | |
catch (SecurityException e) |
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
// http://slurm.trakt.us/js/show/episode.20130474.js | |
if (document.id('check-in')) { | |
document.id('check-in').addEvent('click', function () { | |
if (!window.signedIn) { | |
Cookie.write('checkinEpisode', '1'); | |
window.signInMessage = 'You need to sign in before you can check into this episode!<br /><a href="#" onclick="resetForms(); document.id(\'header-join\').fireEvent(\'click\'); return false;">Join for free</a> if you don\'t have an account already.'; | |
document.id('header-signin').fireEvent('click'); | |
return false; | |
} |
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
/* buildHtml - Helper method to construct html tags easily */ | |
var buildHtml = function(tag, attrs, innerHtml) { | |
var h = '<' + tag; | |
for (var attr in attrs) { | |
if(attrs[attr] === false) { | |
continue; | |
} | |
h += ' ' + attr + '="' + attrs[attr] + '"'; | |
} | |
return h += innerHtml ? '>' + innerHtml + '</' + tag + '>' : '/>'; |
-
http://www.playframework.com/documentation/2.1.1/ScalaJsonCombinators
-
https://github.com/ReactiveMongo/Play-ReactiveMongo
import play.api.libs.json.Reads._
OlderNewer