Skip to content

Instantly share code, notes, and snippets.

@harmdewit
harmdewit / mac-dev-setup-checklist.md
Last active November 21, 2016 14:40
Mac Dev Setup Checklist
  • Shell
    • [] bla
  • Sublime
# 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) ->
# 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')
ActionController::Base.helpers.number_to_human_size(`ps -o rss= -p #{Process.pid}`.to_i * 1024)
git config http.postBuffer 524288000
# 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:
@harmdewit
harmdewit / thin
Created April 16, 2013 10:08 — forked from sorah/thin
#!/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