Skip to content

Instantly share code, notes, and snippets.

@jordanbyron
jordanbyron / authentication.rb
Last active January 2, 2019 21:06
Custom authentication strategy for Devise with login screens, routes, and no database_authenticatable - Full writeup: http://blog.jordanbyron.com/post/54013166913/devise-authentication-strategy-without
module AuthApp
class CustomAuthentication < Devise::Strategies::Authenticatable
# This check is run before +authenticate!+ is called to determine if this
# authentication strategy is applicable. In this case we only try to authenticate
# if the login and password are present
#
def valid?
login && password
end
@willurd
willurd / web-servers.md
Last active December 10, 2025 10:35
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000