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
# Recently I had to send a password to someone over Skype. Since that's obviously not a good idea, I asked for | |
# the person's public SSH RSA key, and used it to encrypt the password itself. | |
# Convert the public key into PEM format | |
ssh-keygen -f path/to/id_rsa.pub -e -m pem > ~/id_rsa.pub.pem | |
# Using the public pem file to encrypt a string | |
echo "sometext" | openssl rsautl -encrypt -pubin -inkey ~/id_rsa.pub.pem > ~/encrypted.txt |
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/sh | |
ECHO='echo ' | |
for branch in $(git branch -a | sed 's/^\s*//' | sed 's/^remotes\///' | grep -v 'master$'); do | |
if [[ "$(git log $branch --since "6 months ago" | wc -l)" -eq 0 ]]; then | |
if [[ "$DRY_RUN" = "false" ]]; then | |
ECHO="" | |
fi | |
local_branch_name=$(echo "$branch" | sed 's/remotes\/origin\///') | |
$ECHO git branch -d "${local_branch_name}" |
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
# the following two lines give a two-line status, with the current window highlighted | |
hardstatus alwayslastline | |
hardstatus string '%{= kG}[%{G}%H%? %1`%?%{g}][%= %{= kw}%-w%{+b yk} %n*%t%?(%u)%? %{-}%+w %=%{g}][%{B}%m/%d %{W}%C%A%{g}]' | |
# huge scrollback buffer | |
defscrollback 5000 | |
# no welcome message | |
startup_message off |