Skip to content

Instantly share code, notes, and snippets.

View zotherstupidguy's full-sized avatar

Mo zotherstupidguy

  • hackspree
  • simplicity is the final achievement
View GitHub Profile
anonymous
anonymous / ilove hackspree
Created April 20, 2017 12:37
somthing cool
<p>hackspree gist demo</p>
@noahhendrix
noahhendrix / api.rb
Created December 22, 2011 09:38
Authenticating with Grape
module Todo
class API < Grape::API
use Rack::Session::Cookie
version 'v1', :format => :json
helpers do
def current_user
return nil if env['rack.session'][:user_id].nil?
@current_user ||= User.get(env['rack.session'][:user_id])
end