Skip to content

Instantly share code, notes, and snippets.

View apfohl's full-sized avatar

Andreas Pfohl apfohl

View GitHub Profile
@remino
remino / Gemfile
Created January 9, 2014 18:01
kramdown-rails: Use Kramdown (Markdown) in Rails 4
# Gemfile
gem 'kramdown'
class Array
def comprehend &block
return self unless block
head, *tail = self.map(&:to_a)
return head.map(&block).compact if tail.empty?
return head.product(*tail).map(&block).compact
end
end
def sieve list
@denvazh
denvazh / gitlab
Last active September 6, 2019 03:43
Freebsd port of script to manage gitlab as system service.
#!/bin/sh
#
# Written by Denis Vazhenin <[email protected]>
#
# This script was ported from Debian/Ubuntu version of start script for Gitlab:
# https://raw.github.com/gitlabhq/gitlabhq/master/lib/support/init.d/gitlab
#
# PROVIDE: gitlab
# REQUIRE: NETWORKING SERVERS DAEMON LOGIN
# KEYWORD: shutdown
@irae
irae / .gitconfig
Last active February 14, 2020 09:52
Git Vommit -- making typos fun and refreshing
[alias]
vommit = !sh -c \"cat ~/.gitvommit\"