Skip to content

Instantly share code, notes, and snippets.

Despo Pentara despo

Block or report user

Report or block despo

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View hagakure.md

There is something to be learned from a rainstorm. When meeting with a sudden shower, you try not to get wet and run quickly along the road. But doing such things as passing under the eaves of houses, you still get wet. When you are resolved from the beginning, you will not be perplexed, though you will still get the same soaking. This understanding extends to everything.

View devise.rb
...
# ==> Configuration for any authentication mechanism
# Configure which keys are used when authenticating a user. The default is
# just :email. You can configure it to use [:username, :subdomain], so for
# authenticating a user, both parameters are required. Remember that those
# parameters are used only when authenticating and not when retrieving from
# session. If you need permissions, you should implement that in a before filter.
# You can also supply a hash where the value is a boolean determining whether
# or not authentication should be aborted when the value is not present.
config.authentication_keys = [ :login ]
@despo
despo / deferred_garbage_collection.rb
Created Dec 13, 2013
Deferred Garbage Collection
View deferred_garbage_collection.rb
class DeferredGarbageCollection
DEFERRED_GC_THRESHOLD = (ENV['DEFER_GC'] || 15.0).to_f
@@last_gc_run = Time.now
def self.start
GC.disable if DEFERRED_GC_THRESHOLD > 0
end
@despo
despo / cobol.jpg
Last active Dec 28, 2015
codebar-html-lesson-4
@despo
despo / the_command_line_is_your_friend.md
Last active Dec 16, 2015
Rails Girls London lightning talk - The command line is your friend
View the_command_line_is_your_friend.md

Rails Girls London logo Rails Girls London - 19th-20th April 2013

Commandline basics

Basic filestystem structure

.
|____home
| |____despo
You can’t perform that action at this time.