Skip to content

Instantly share code, notes, and snippets.

View follmann's full-sized avatar

Andreas Follmann follmann

View GitHub Profile
@follmann
follmann / Preferences.sublime-settings
Last active August 29, 2015 14:21
Sublime Text - User Preferences
{
"color_scheme": "Packages/Theme - Nil/Big Duo.tmTheme",
"font_size": 12,
"highlight_line": true,
"highlight_modified_tabs": true,
"ignored_packages":
[
"Vintage"
],
"rulers":
@follmann
follmann / elixir_pin_operator_behaviour.md
Last active August 29, 2015 14:16
Elixir (1.0.3) Pin Operator failing for pattern matches in for comprehensions

pin operator behaviour in match pattern

match with a tuple

iex(1)> x = 2
2
iex(2)> {^x, y} = {2, 1}
{2, 1}
iex(3)> y
1
iex(4)> {^x, y} = {3, 1}

Keybase proof

I hereby claim:

  • I am follmann on github.
  • I am follmann (https://keybase.io/follmann) on keybase.
  • I have a public key whose fingerprint is B553 4854 962C 01A6 0264 86FC EA41 184C 620A 9982

To claim this, I am signing this object:

@follmann
follmann / mongo-functions.js
Last active October 13, 2015 12:08 — forked from loopj/mongo-functions.js
Useful Mongo Shell Functions
DB.prototype.getCurrentOpStats = function() {
intervals = [1,5,10,30]
waitingForLock = 0;
secsRunningStats = {};
inProg = db.currentOp()["inprog"]
inProg.forEach(function (op) {
if(op["waitingForLock"]) {
waitingForLock += 1;
}
@follmann
follmann / Manual and upstart config for AeroFS (aerofs-cli) on Ubuntu 12.04.1 LTS
Last active May 19, 2022 05:35
Manual and upstart config for AeroFS (aerofs-cli) on Ubuntu 12.04.1 LTS
Manual and upstart config for AeroFS (aerofs-cli) on Ubuntu 12.04.1 LTS:
# link standard upstart script
cd /etc/init.d
sudo ln -s /lib/init/upstart-job aerofs-cli
# create upstart config for aerofs-cli
sudo nano /etc/init/aerofs-cli.conf
(replace andreas with your desired runtime user)
----
@follmann
follmann / rbenv-install-system-wide.sh
Created February 14, 2012 21:36 — forked from v1nc3ntlaw/rbenv-install-system-wide.sh
rbenv install on Debian 6 Squeeze
# 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 curl
apt-get -y install libssl-dev
apt-get -y install libreadline5 libreadline5-dev
apt-get -y install zlib1g zlib1g-dev
# for passenger needed
@follmann
follmann / rvm2rbenv.txt
Created February 9, 2012 18:12 — forked from brentertz/rvm2rbenv.txt
Switch from RVM to RBENV
## Prepare ###################################################################
# Remove RVM
rvm implode
# Ensure your homebrew is working properly and up to date
brew doctor
brew update
## Install ###################################################################
@follmann
follmann / content_helper.rb
Created August 1, 2011 10:22
content_for helper implementation for StaticMatic
module ContentHelper
# Usage example:
# set content for identifier javascript
# - content_for :javascript do
# :javascript
# //jscode
# recall with:
# = content_for :javascript