- Shell
- [] bla
- Sublime
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# A class-based template for jQuery plugins in Coffeescript | |
# | |
# $('.target').myPlugin({ paramA: 'not-foo' }); | |
# $('.target').myPlugin('myMethod', 'Hello, world'); | |
# | |
# Check out Alan Hogan's original jQuery plugin template: | |
# https://github.com/alanhogan/Coffeescript-jQuery-Plugin-Template | |
# | |
do ($ = window.jQuery, window, document) -> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# config/initializers/clear_logs.rb | |
# This snippet simply clears your logs when they are too large. | |
# Every time you start the rails environment it checks log sizes | |
# and clears the logs for you if necessary. | |
if Rails.env.development? | |
MAX_LOG_SIZE = 10.megabytes | |
logs = File.join(Rails.root, 'log', '*.log') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ActionController::Base.helpers.number_to_human_size(`ps -o rss= -p #{Process.pid}`.to_i * 1024) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git config http.postBuffer 524288000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Meer vetalingen via https://github.com/plataformatec/devise/wiki/I18n | |
# Voeg 'config.i18n.default_locale = :nl' toe in je 'application.rb' en herstart je server | |
nl: | |
devise: | |
confirmations: | |
confirmed: "Je account is bevestigd, je bent nu ingelogd." | |
send_instructions: "Je zult een e-mail met instructies ontvangen over hoe je jouw account moet bevestigen over een paar minuten." | |
send_paranoid_instructions: "Als je e-mail bestaat in onze database, zul je een e-mail met instructies ontvangen over hoe je jouw account moet bevestigen over een paar minuten." | |
failure: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
DAEMON=/path/to/thin | |
BUNDLE=/path/to/bundle | |
CONFIG_PATH=/etc/thin | |
SCRIPT_NAME=/etc/init.d/thin | |
# Exit if the package is not installed | |
[ -x "$DAEMON" ] || exit 0 |