This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
file { "/home/${username}/.ssh/authorized_keys": | |
mode => 644, | |
owner => $username, | |
group => $username, | |
source => "https://github.com/knoopx.keys" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git new release # creates a new release branch (release/X.Y.Z) from the latest tagged version incrementing minor version from upstream's integration branch | |
git new release --bump major # creates a new release branch (release/X.Y.Z) from the latest tagged version incrementing major version | |
git new feature branch-name # creates a new feature branch (feature/branch-name) from upstream's integration branch | |
git new hotfix branch-name # creates a new hotfix branch (hotfix/branch-name) from upstream's stable branch |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# change modifier keys | |
# install brew | |
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" | |
brew install mas | |
mas upgrade | |
# core utils | |
brew install findutils ssh-copy-id unrar wget git hub gnutls gnu-tar trash fzf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(document).ready(function () { | |
var TableParser = function () { | |
function isEmpty(line) { | |
var empty = true; | |
$.each(line, function(_, value) { | |
if (value.trim()) { | |
empty = false; | |
return false; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$rreplace($rreplace($rreplace($if2(%albumartist%,%artist%)-%album%$if(%catalognumber%,-\($upper($rreplace(%catalognumber%,[^A-Za-z0-9],))\))$if(%date%,-$left(%date%,4))/$lower($num(%tracknumber%,2)-%artist%-%title%),['\\.\,;:]+,),\\s+,_),Various_Artists,VA) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo dscl . -create ~ UserShell `which fish` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# http://winstonyw.com/2014/10/24/setting_up_ruby_on_rails_on_digital_ocean/ | |
# https://github.com/mattdbridges/capistrano-recipes/blob/master/postgresql.rb | |
set -euo pipefail | |
LOCALE="en_US.utf8" | |
TIMEZONE="Europe/Madrid" | |
ADMIN_USER="admin" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash -e | |
set -euo pipefail | |
shopt -s globstar | |
shopt -s extglob | |
export RUBY_HEAP_MIN_SLOTS=2000000 | |
export RUBY_HEAP_FREE_MIN=20000 | |
export RUBY_GC_MALLOC_LIMIT=100000000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
set -xeuf -o pipefail | |
export DEPLOY_PATH="/home/deploy/mindo.io" | |
export CURRENT_PATH="$DEPLOY_PATH/current" | |
export REPO_PATH="$DEPLOY_PATH/repo" | |
export SHARED_PATH="$DEPLOY_PATH/shared" | |
export RELEASE_PATH="$DEPLOY_PATH/releases/$(date +%s)" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module FiltrableModel | |
def filter_class=(klass) | |
@filter_class = klass | |
end | |
def filter(params = {}) | |
@filter_class or raise "No filter model specified" | |
@filter_class.new(self).apply(params) | |
end | |
end |