Skip to content

Instantly share code, notes, and snippets.

View simianhacker's full-sized avatar

Chris Cowan simianhacker

View GitHub Profile
class Application < Merb::Controller
before :check_remember_me
def check_remember_me
unless session.authenticated?
if cookies[:auth_token]
if user = User.first(:auth_token=>cookies[:auth_token])
if user.valid_token?
session.user = user
end
--[[
VPLanguage = lua
VPScriptMenuTitle = GitHub Commit
VPEndConfig
]]
-- we assume git is located in /opt/local/bin/git
posix.chdir(document:fileName())
-- add new files