| # I got this idea from http://mihai.bazon.net/blog/redis-client-library-javascript-node | |
| # The technique relies on the fact that raising an exception clears the call stack. | |
| # The context is passed along with a block attached to an exception. | |
| # I thought it was brilliant js hackery so I decided to try my hand at it in ruby. | |
| # I've also included some other stack-dependent implementations. | |
| # straight recursion, not quite a tail-call | |
| # I can't go above 8.1k without stack error | |
| def rsum(num) | |
| if num == 0 |
| BEGIN { | |
| require 'net/http' | |
| Net::HTTP.module_eval do | |
| alias_method '__initialize__', 'initialize' | |
| def initialize(*args,&block) | |
| __initialize__(*args, &block) |
-
The new rake task assets:clean removes precompiled assets. [fxn]
-
Application and plugin generation run bundle install unless
--skip-gemfileor--skip-bundle. [fxn] -
Fixed database tasks for jdbc* adapters #jruby [Rashmi Yadav]
-
Template generation for jdbcpostgresql #jruby [Vishnu Atrai]
| # autoload concerns | |
| module YourApp | |
| class Application < Rails::Application | |
| config.autoload_paths += %W( | |
| #{config.root}/app/controllers/concerns | |
| #{config.root}/app/models/concerns | |
| ) | |
| end | |
| end |
Works in Mikrob which is deployed both to Titanium Desktop and as a Chrome Application.
This code was extracted from my own code and a wrapper library which I'm working on.
Any questions? Post them in comments.
Here's where everything happens:
| // ==UserScript== | |
| // @name YT Hide | |
| // @description Adds the ability to hide (or, as one can say, mark as watched) videos on the subscription list on YouTube | |
| // @include *www.youtube.com/my_subscriptions* | |
| // @include *youtube.com/my_subscriptions* | |
| // @include *.youtube.com/my_subscriptions* | |
| // ==/UserScript== | |
| // http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js | |
| // http://documentcloud.github.com/underscore/underscore-min.js | |
| // https://raw.github.com/andris9/jStorage/master/jstorage.js |
by Jonathan Rochkind, http://bibwild.wordpress.com
Capistrano automates pushing out a new version of your application to a deployment location.
I've been writing and deploying Rails apps for a while, but I avoided using Capistrano until recently. I've got a pretty simple one-host deployment, and even though everyone said Capistrano was great, every time I tried to get started I just got snowed under not being able to figure out exactly what I wanted to do, and figured I wasn't having that much trouble doing it "manually".
| { | |
| // -------------------------------------------------------------------- | |
| // JSHint Configuration, Strict Edition | |
| // -------------------------------------------------------------------- | |
| // | |
| // This is a options template for [JSHint][1], using [JSHint example][2] | |
| // and [Ory Band's example][3] as basis and setting config values to | |
| // be most strict: | |
| // | |
| // * set all enforcing options to true |
This document is intended to be a simplified version of the OAuth 2.0 specification. In particular it has been written with implementors in mind, and as such attempts to trim the spec down to just what you need to implement an OAuth provider or client. It is necessarily not complete, but attempts to introduce spec requirements in the same order in which the protocol proceeds in practise, with everything you need to know about each protocol endpoint brought together in one place rather than scattered across a large document.