Description: Setup GitHub Pages "gh-pages" branch and "master" branch as subfolders of a parent project folder ("grandmaster").
Author: Chris Jacob @_chrisjacob
Tutorial (Gist): https://gist.github.com/833223
require 'async-rack' | |
require 'rack/cache' | |
module Rack::Cache | |
class Context | |
include AsyncRack::AsyncCallback::Mixin | |
def async_callback(result) | |
response = Response.new(*result) | |
@request ||= Request.new(env.dup.freeze) | |
store response if response.cacheable? |
#This is for Devise 1.2.x | |
# To your routes file add: | |
as :user do | |
match '/user/confirmation' => 'confirmations#update', :via => :put, :as=> :update_user_confirmation | |
end | |
# Add this inherited confirmations controller as app/controllers/confirmations_controller.rb |
Description: Setup GitHub Pages "gh-pages" branch and "master" branch as subfolders of a parent project folder ("grandmaster").
Author: Chris Jacob @_chrisjacob
Tutorial (Gist): https://gist.github.com/833223
require 'rubygems' | |
require 'uri' | |
require 'yajl' | |
require 'yajl/http_stream' | |
require 'rest_client' | |
require 'slingshot' | |
URLS = %w[ | |
http://github.com/api/v2/json/issues/list/karmi/elasticsearch.github.com/open |
# = Collection | |
# | |
# Module which allows to use a proxy class for wrapping collections of all sorts. | |
# | |
# Let's take a collection of articles, for example (see also the test suite below). | |
# | |
# The collection item class could look like this: | |
# | |
# class Article | |
# attr_reader :title |
describe "GET current" do | |
before do | |
@request.cookies['hidden_notices'] = "1,#{notices(:permanent).id}" | |
get :current, :format => 'js' | |
end | |
it { should respond_with(:success) } | |
it { should set_cookie(:hidden_notices).to("#{notices(:permanent).id}") } | |
it { should render_template('notices/current') } | |
end |
<!DOCTYPE html> | |
<!-- | |
Stuart Powers | |
http://sente.cc/ | |
http://twitter.com/stuartpowers | |
--> | |
<html> | |
<head> |
# ======================================================= | |
# Importing and searching RSS with ElasticSearch and Tire | |
# ======================================================= | |
# | |
# This script downloads, parses and indexes Stackoverflow RSS feed with ElasticSearch | |
# via the [Tire](https://github.com/karmi/tire) Rubygem. | |
# | |
# Requirements | |
# ------------ | |
# |
#!/usr/bin/env ruby | |
$: << File.join(File.dirname(__FILE__), '../lib') | |
require 'goliath' | |
require 'em-mongo' | |
require 'em-http' | |
require 'em-synchrony/em-http' | |
require 'yajl/json_gem' | |
require 'goliath/synchrony/mongo_receiver' # has the aroundware logic for talking to mongodb | |
require File.join(File.dirname(__FILE__), 'auth_receiver') |
.DS_Store | |
*.log | |
Gemfile.lock |