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"
If you do this, you are awesome.
I use this for static and simple [Sinatra][1] based sites -- great for prototyping simple apps. Credit goes to http://toroid.org/ams/git-website-howto for the original idea.
If you don't know what this is, here's an example of how I deploy my website/app to a server:
# create/update/delete files in my site
git add .
git commit -m "description of the changes I made"
git push
In this document I am using Sass's SCSS syntax. You can choose to use the indented syntax in sass, if you prefer it, it has no functional differences from the SCSS syntax.
For Less, I'm using the JavaScript version because this is what they suggest on the website. The ruby version may be different.
window.addEventListener "DOMContentLoaded", -> | |
body = $ "body" | |
canvas = $ "#canvas" | |
chalkboard = $ "#chalkboard" | |
close = $ "#close" | |
ledge = $ "#ledge" | |
lightswitch = $ "#lightswitch" | |
output = $ "#output" | |
shade = $ "#shade" | |
share = $ "#share" |
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'); | |
}, |
/* | |
* 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 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] |
//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' |
// ---------------------------------------------------------- | |
// A short snippet for detecting versions of IE in JavaScript | |
// without resorting to user-agent sniffing | |
// ---------------------------------------------------------- | |
// If you're not in IE (or IE version is less than 5) then: | |
// ie === undefined | |
// If you're in IE (>=5) then you can determine which version: | |
// ie === 7; // IE7 | |
// Thus, to detect IE: | |
// if (ie) {} |
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")' |