Skip to content

Instantly share code, notes, and snippets.

View rrouse's full-sized avatar

Robert Rouse rrouse

  • St. Louis, Missouri
View GitHub Profile
@rrouse
rrouse / status_header_setter
Created July 4, 2012 19:35 — forked from ktkaushik/status_header_setter
Set HTTP status headers with respond_with( object ) in rails.
1xx Informational
100 Continue :continue
101 Switching Protocols :switching_protocols
102 Processing :processing
2xx Success
200 OK :ok
@rrouse
rrouse / ActionbarTabsPager.java
Created November 26, 2012 13:57 — forked from graetzer/ActionbarTabsPager.java
Android FragmentTabsPager with Actionbarsherlock
import java.util.ArrayList;
import android.content.Context;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentActivity;
import android.support.v4.app.FragmentPagerAdapter;
import android.support.v4.app.FragmentTransaction;
import android.support.v4.view.ViewPager;
class ApplicationController < ActionController::Base
# Prevent CSRF attacks by raising an exception.
# For APIs, you may want to use :null_session instead.
protect_from_forgery with: :exception
before_filter :load_config
def load_config
@site = Siteconfig.first
end