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
export CLICOLOR=1 | |
export LSCOLORS=Gxfxcxdxbxegedabagacad | |
[[ -f $HOME/.dircolors ]] && eval $(dircolors -b $HOME/.dircolors) | |
if $_isxrunning; then | |
[[ -f $HOME/.dircolors_256 ]] && eval $(dircolors -b $HOME/.dircolors_256) | |
export TERM='xterm-256color' |
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
# Start FTP Server | |
launchctl load -w /System/Library/LaunchDaemons/ftp.plist | |
# Stop FTP Server | |
launchctl unload -w /System/Library/LaunchDaemons/ftp.plist |
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
# merge project-a to a project-b with all the history | |
cd path/to/project-b | |
git remote add project-a path/to/project-a | |
git fetch project-a | |
git merge --allow-unrelated-histories project-a/master | |
git remote remove project-a | |
git add . | |
git commit -m <message> |
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
#Switch off the network in every three hour | |
while [ 1 -lt 2 ] | |
do | |
networksetup -setairportpower en0 off; | |
sleep 3h; | |
done | |
#:) |
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
export HOMEBREW_NO_GITHUB_API=1 | |
export HOMEBREW_NO_ANALYTICS=1 | |
export N_PREFIX=~/.n | |
# Handle Zsh history | |
export HISTFILE=~/.zsh_history | |
export HISTSIZE=10000000 | |
export SAVEHIST=10000000 | |
setopt BANG_HIST # Treat the '!' character specially during expansion. |
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
export GOENV_VERSION=1.10.3 | |
export GOPATH=$HOME/go | |
export PATH=$PATH:$GOPATH/bin | |
export PATH=/usr/local/opt/freetds@0.91/bin:$PATH |
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
import argparse | |
import boto.sqs | |
import json | |
import os | |
parser = argparse.ArgumentParser(description='Saves all messages from an AWS SQS queue into a folder.') | |
parser.add_argument( | |
'-q', '--queue', dest='queue', type=str, required=True, | |
help='The name of the AWS SQS queue to save.') |
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 -i ${KEY_FILE} -o ProxyCommand="ssh -i ${KEY_FILE} $2@bastion.$1.example.com nc %h %p" $2@$3 $4 |
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
openssl genrsa -out private.pem 2048 | |
openssl rsa -in private.pem -outform PEM -pubout -out public.pem |
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-keygen -m PEM -t rsa -b 4096 | |
openssl rsa -in identity -pubout | |
echo content | openssl rsautl -encrypt -pubin -inkey identity.pub.pem > ciphertext.txt | |
openssl rsautl -decrypt -inkey identity -in ciphertext.txt |
OlderNewer