Skip to content

Instantly share code, notes, and snippets.

Maik Kempe mkempe

Block or report user

Report or block mkempe

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
mkempe / my_app.conf
Created Sep 25, 2014
RVM, Wrapper, Unicorn, Init.d
View my_app.conf
NAME="My App"
mkempe / einbeinige.rb
Created Oct 19, 2011
Using ActiveRecord / Nokogiri for xml → database convert action
View einbeinige.rb
# encoding: utf-8
require 'active_record'
require 'mysql2'
require 'nokogiri'
require 'yaml'
ROOT = File.join(File.dirname(__FILE__), '..')
# ActiveRecord::Base.logger ='log/debug.log')
View mixins.sass
@mixin arrow($color: white, $padding: 0 0 0 pem(15))
background: transparent url('/images/bundle/icons/arrows/#{$color}.gif') no-repeat left center
padding: $padding
@mixin underscore($border-color: #FFF, $border-bottom-width: 1px, $padding: 0 0 pem(1))
display: inline-block
border-bottom: #{$border-bottom-width} solid transparent
padding: $padding
mkempe / gist:5804668
Created Jun 18, 2013
Find path of installed gem through ruby.
View gist:5804668
specs = Gem.latest_spec_for 'foo'
puts specs.gem_dir
Handlebars.registerHelper 'forEach', (array, options) ->
return options.inverse @ if (options.inverse && !array.length), index) ->
item.$index = index
item.$first = index is 0
item.$last = index is array.length - 1
options.fn item
).join ''
View faker.rb
#!/usr/bin/env rake
# encoding: utf-8
require 'faker'
namespace :faker do
desc '“Fakes” name'
task :name do
View gist:4148951
#!/usr/bin/env monit
check host with address
group www
if failed icmp type echo with timeout 5 seconds for 1 cycles then alert
if failed port 80 protocol http timeout 5 seconds for 1 cycles then alert
if failed url timeout 5 seconds for 1 cycles then alert
mkempe / gist:4135568
Last active Oct 13, 2015
Vaading monkey patching at its best.
View gist:4135568
$('.v-app').livequery(function() {
$(this).resize(function(e) {
if ($.browser.msie && parseInt($.browser.version, 10) <= 8) {
mkempe / gist:3934476
Created Oct 22, 2012
Scala / MacPorts
View gist:3934476
$ port install scala2.9
$ port install scala_select
$ port select --set scala scala2.9
mkempe / gist:3871966
Created Oct 11, 2012
Capistrano: Deploy tag
View gist:3871966
set :branch do
default_tag = `git tag`.split("\n").last
tag = Capistrano::CLI.ui.ask "Tag to deploy [#{default_tag}]: "
tag = default_tag if tag.empty?
You can’t perform that action at this time.