If you do this, you are awesome.
- Update to node 0.4.0
- Go to https://github.com/ry/node/issues
- Pick a bug.
- Try to reproduce it.
- Comment with either:
- "works for me on 0.4.0"
import org.sinatraLikeServlet.*; | |
public class MyApplication extends SinatraLikeHTTPServlet { | |
@get("/") | |
public void index(SinatraLikeHTTPServletRequest req | |
SinatraLikeHTTPServletResponse resp) { | |
MyResource[] resources = MyResource.findAll(); | |
req.setAttribute("resources", resources); | |
} |
require 'java' | |
java_import 'javax.ws.rs.Path' | |
java_import 'javax.ws.rs.GET' | |
java_import 'javax.ws.rs.Produces' | |
java_package 'com.headius.demo.jersey' | |
java_annotation 'Path("/helloworld")' | |
class HelloWorld | |
java_annotation 'GET' | |
java_annotation 'Produces("text/plain")' |
//manifest.js: defines the grouping of js/css | |
var $packager.assets = { | |
'app.js': [ | |
{ name:'jquery.js', wait:true }, | |
{ name:'sfasdf.js', wait:true }, | |
{ name:'fasdt.js', wait:true } | |
], | |
'app.css': [ | |
'blueprint.css', | |
'style.css' |
var wc = {}; | |
$.getJSON('http://wc/rest/api/resourceIndex',function(d){ | |
wc = JSON.parse(d); | |
}); | |
// based on @ded's async method chaining http://www.dustindiaz.com/async-method-queues/ | |
// will initiate an async req to get the current user and lazily populates the currentUser | |
// object. | |
> wc.currentUser | |
[object currentUser] |
/* | |
* A more dynamic API for WebCenter | |
* Rich Manalang / @rmanalan | |
* | |
* This is an attempt to make a better Javascript wrapper for the WebCenter REST API. | |
* Goals: | |
* - Dynamic object creation | |
* - Callbacks receive proper objects from prior call | |
* - Concurrent request support | |
* - Beautiful API |
var $w = function(){ | |
var $w = function(){ | |
return new $w.init; | |
} | |
$w.prototype = { | |
// add all of the methods/props you want accessible as $w().method() or $w().prop here: | |
init: function(){ | |
console.log('init called'); | |
}, |
window.addEventListener "DOMContentLoaded", -> | |
body = $ "body" | |
canvas = $ "#canvas" | |
chalkboard = $ "#chalkboard" | |
close = $ "#close" | |
ledge = $ "#ledge" | |
lightswitch = $ "#lightswitch" | |
output = $ "#output" | |
shade = $ "#shade" | |
share = $ "#share" |
If you do this, you are awesome.
# Usage: show <local-port> <subdomain> | |
function show() { | |
DOMAIN=".tekacs.com" | |
REMOTE="$2$DOMAIN" | |
ssh -tR 1080:127.0.0.1:$1 vps "sudo ssh -Nl \$USER -L $REMOTE:80:127.0.0.1:1080 localhost" | |
} |
a list of slides from nodeconf
you may want to take a look at the jsconf-gist too!