Skip to content

Instantly share code, notes, and snippets.

View kassi's full-sized avatar

Karsten Silkenbäumer kassi

View GitHub Profile
@kassi
kassi / rbenv-install-system-wide.sh
Created June 6, 2012 23:11 — forked from jnx/rbenv-install-system-wide.sh
rbenv install and system wide install on Ubuntu 10.04 LTS.
# Update, upgrade and install development tools:
apt-get update
apt-get -y upgrade
apt-get -y install build-essential
apt-get -y install git-core
# Install rbenv
git clone git://github.com/sstephenson/rbenv.git /usr/local/rbenv
# Add rbenv to the path:
@kassi
kassi / .ackrc
Created July 18, 2012 16:57
System Files
--type-add
html=.mtml
@kassi
kassi / .gemrc
Created July 18, 2012 20:51
System Files: ruby
gem: --no-ri --no-rdoc
install: --no-rdoc --no-ri
update: --no-rdoc --no-ri
@kassi
kassi / init.sh
Created July 18, 2012 20:55
System Setup: OSX
# System
# install homebrew: http://mxcl.github.com/homebrew/
ruby <(curl -fsSkL raw.github.com/mxcl/homebrew/go)
brew install ack
brew install bash-completion
# Development Tools
@kassi
kassi / .perlcriticrc
Created July 18, 2012 21:36
System Files: perl
[CodeLayout::RequireTidyCode]
perltidyrc = ~/.perltidyrc
[-Miscellanea::RequireRcsKeywords]
[-Documentation::RequirePodAtEnd]
[-Documentation::RequirePodSections]
@kassi
kassi / gist:3224919
Created August 1, 2012 08:18
Update URLs in Safari Bookmarks & History
# close Safari!
cd ~/Library/Safari
cp Bookmarks.plist History.plist ~ # make a backup!!
# convert to readable
plutil -convert xml1 Bookmarks.plist
plutil -convert xml1 History.plist
# change with regex
@kassi
kassi / starter-app.rb
Created November 7, 2012 00:52
Rails Starter App defaults file
rails_apps_composer new my_app -d starter-app.yml
@kassi
kassi / .bash_functions
Created August 29, 2013 20:15
Excerpt of my .bash_functions: function ci
function ci {
command="$*"
filename="/tmp/ci-$RANDOM-$$"
if [ "$1" == "rails" -a "$2" == "new" -a -n "$3" ]; then
echo "Initialize new rails app" > $filename
echo >> $filename
echo "Command:" >> $filename
echo " $command" >> $filename
$command && cd "$3" && git init && git add . && git commit -a -F $filename
@kassi
kassi / gist:9473340
Last active August 29, 2015 13:57 — forked from reiz/gist:9468356
def self.create_index_with_mappings
Tire.index Settings.elasticsearch_product_index do
create :settings => {
:number_of_shards => 1,
:number_of_replicas => 1,
:analysis => {
:filter => {
:name_ngrams => {
:side => 'front',
:type => 'edgeNGram',
LoadModule passenger_module /usr/lib/apache2/modules/mod_passenger.so
<IfModule mod_passenger.c>
PassengerRoot /usr/lib/ruby/vendor_ruby/phusion_passenger/locations.ini
PassengerDefaultRuby /usr/local/rvm/wrappers/ruby-2.1.1/bin/ruby
PassengerMaxPoolSize 10
PassengerMinInstances 1
PassengerDebugLogFile /var/log/passenger.log
PassengerFriendlyErrorPages off
</IfModule>