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
# Original Gist: https://gist.github.com/trinitronx/5979265 | |
# RP Gist: https://gist.github.com/returnpathadmin/dbffee1d3d675f271435 | |
# Function to set git author & committer email addresses based on your cwd | |
# Uses the very first .gitemail file found while traversing up directories | |
# Use case: As a developer, | |
# Given that I have a .gitemail file in my work directory containing my work email | |
# When I am in the work directory | |
# Then I should be able to commit with my work email address | |
# Given that I have a .gitemail file in my public directory containing my public email | |
# When I am in the public directory |
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
// Directive for autoNumeric.js | |
// Require AngularJS, jQuery and autoNumeric.js | |
angular.module('crunch.ui.numeric', []).directive('crNumeric', [function () { | |
'use strict'; | |
// Declare a empty options object | |
var options = {}; | |
return { | |
// Require ng-model in the element attribute for watching changes. | |
require: '?ngModel', | |
// This directive only works when used in element's attribute (e.g: cr-numeric) |
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
# ssh completion | |
if [ -f ~/.ssh/config ] ; then | |
SSH_COMPLETE=( $(grep "^Host " ~/.ssh/config | cut -f2 -d ' ' | sort -u ) ) | |
SSH_COMPLETE=( ${SSH_COMPLETE[*]} $(grep "\w*User " ~/.ssh/config | cut -f2 -d ' ' | sort -u ) ) | |
fi | |
if [ -f ~/.ssh/known_hosts ] ; then | |
SSH_COMPLETE=( ${SSH_COMPLETE[*]} $(cut -f1 -d' ' ~/.ssh/known_hosts | cut -f1 -d',' | sort -u )) | |
fi | |
complete -o default -W "${SSH_COMPLETE[*]}" ssh | |
complete -o default -W "${SSH_COMPLETE[*]}" scp |
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 | |
mkdir -p .ssh | |
chmod 700 .ssh | |
cat >>~/.ssh/authorized_keys<<EOF | |
ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA6SN3kVFVplUtTpag/S8XRUiV/z2IXXVD3EzCAI8pUceIfM3JfoskEwMwxwegjJlP16SYmMfn7TY0Ieah9Z8Fb3dcdh+pqe/e3Jg32BzLARgd4tpOHc+qBJjdzB5pWKdM9XEqolUOyivxb+9nA/zSZokxayXMk2dR437MtvCZeICTnAW5ZC6BjdxlvarNQJyte8/IaiOKI+LpzFPwmY/+Dol6sMZ3LgFibodxqwq7SjRDN65mLkJXJxUF7yfT5tMCNgL1ULdL3LOmO/mEsWQI712AWfT/8+iGHKpkN809PG70nhBKTn52z4nBVEtw+kS4z5fEjFfzfYlrwML2rQ5YoQ== lalyos@ephubudl0127 | |
EOF | |
chmod 644 ~/.ssh/authorized_keys |
NewerOlder