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
mkempe / my_app.conf
Created Sep 25, 2014
RVM, Wrapper, Unicorn, Init.d
View my_app.conf
NAME="My App"
APP_PATH="/var/apps/my_app/current"
UNICORN="/usr/local/rvm/wrappers/my_app/unicorn_rails"
ENVIRONMENT="production"
@mkempe
mkempe / table.tex
Last active Aug 29, 2015
Table with „tabulary“ and line breaks
View table.tex
%\usepackage{longtable}
%\usepackage{tabulary}
\newcommand{\cellOneOne}{ \textbf{Foobar} }
\newcommand{\cellOneTwo}{ \textbf{Foobar} }
\newcommand{\cellOneThree}{ \textbf{Foobar} }
% ----- ----- ----- ----- ----- ----- ----- ----- -----
@mkempe
mkempe / class.coffee
Last active Aug 29, 2015
Coffeescript template for jQuery Plugin + Class.
View class.coffee
class @Awesome
defaults:
isItAwesome: true
constructor: (element, options) ->
@element = $ element
@options = $.extend { }, @defaults, options
setup.call @
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
.label
border-bottom: #{$border-bottom-width} solid transparent
padding: $padding
@mkempe
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
View forEach.coffee
Handlebars.registerHelper 'forEach', (array, options) ->
return options.inverse @ if (options.inverse && !array.length)
array.map((item, 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
puts Faker::Name.name
end
View gist:4148951
#!/usr/bin/env monit
check host foobar.com with address foobar.com
group www
group foobar.com
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 http://foobar.com timeout 5 seconds for 1 cycles then alert
@mkempe
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) {
vaadin.forceLayout();
}
});
});
@mkempe
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
You can’t perform that action at this time.