Skip to content

Instantly share code, notes, and snippets.

@basiszwo
basiszwo / mysql convert database to utf8
Created August 2, 2010 14:17
convert mysql database to utf8
#!/bin/bash
# Use this to convert a database from latin1 (or any other) encoding to utf8 enconding
# Written by sb@ninjaconcept.com: http://www.ninjaconcept.com/
# MySQL Hostname
DBHOST='localhost'
# MySQL Username
DBUSER='root'
de:
errors:
messages:
not_found: "Nicht gefunden"
already_confirmed: "ist bereits bestätigt"
not_locked: "war nicht gesperrt"
devise:
failure:
unauthenticated: 'Du musst dich zuerst anmelden.'
@basiszwo
basiszwo / gist:970312
Created May 13, 2011 10:27
Missing default_host_options in rails model
# application_controller.rb
before_filter :default_hosts
# set dynamically to always correct paths and urls (dev, stage, testing)
def default_hosts
ActionController::Base.default_url_options[:host] = request.host_with_port
ActionMailer::Base.default_url_options[:host] = request.host_with_port
end
@basiszwo
basiszwo / gist:2006795
Created March 9, 2012 14:44
Campfire Capistrano task
#############################################################
# Campfire
#############################################################
after :deploy, 'campfire:notify'
namespace :campfire do
require 'tinder'
load File.join(File.dirname(__FILE__), 'initializers/campfire_config.rb')
@basiszwo
basiszwo / gist:3079175
Created July 9, 2012 21:39
Discover large files in git repository
#!/bin/bash
#set -x
# Shows you the largest objects in your repo's pack file.
# Written for osx.
#
# @see http://stubbisms.wordpress.com/2009/07/10/git-script-to-show-largest-pack-objects-and-trim-your-waist-line/
# @author Antony Stubbs
# set the internal field spereator to line break, so that we can iterate easily over the verify-pack output
@basiszwo
basiszwo / dotfiles-or-settings.md
Last active December 30, 2015 10:28
Sublime Text 2 Resources
@basiszwo
basiszwo / charting-resources.md
Created April 16, 2013 14:42
Resources for serious charting