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 | |
git stash list | |
echo "Enter stash number to rename" | |
read stash_number | |
echo "Enter new name" | |
read new_name | |
stash_name="stash@{${stash_number}}" | |
echo "$stash_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
#!/bin/bash | |
## https://gist.github.com/jdforsythe/09e9fd0dc7f75e7468fc48c9bc8b1598 | |
## | |
## This will: | |
## | |
## 1. Install `mkcert` and create a self-signed CA and certificates for fake domains and trust them | |
## with the system's trust store. This allows you to develop using the same SSL/TLS techniques you | |
## would in production, bringing dev-prod parity and allowing things like cross-sub-domain secure |
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 | |
## make sure /usr/local/sbin exists - it *should* be created by homebrew on install | |
if [ ! -d /usr/local/sbin ]; then | |
echo "Homebrew didn't create /usr/local/sbin - creating now..." | |
sudo mkdir /usr/local/sbin | |
sudo chown $(whoami):admin /usr/local/sbin | |
chmod 775 /usr/local/sbin | |
fi |
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
<?php | |
namespace App\Console\Commands; | |
use Illuminate\Console\Command; | |
use Carbon\Carbon; | |
use Illuminate\Queue\Worker; | |
use Illuminate\Contracts\Queue\Job; | |
use Symfony\Component\Console\Input\InputOption; |
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
version: 2.1 | |
orbs: | |
docker-publish: circleci/docker-publish@0.1.6 | |
workflows: | |
build: | |
jobs: | |
- docker-publish/publish: | |
deploy: 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
#!/usr/bin/env bash | |
## | |
## download minikube, kubectl, and istio and add istioctl to path | |
## | |
## these steps only need performed one time | |
## | |
brew install kubernetes-cli | |
brew cask install minikube | |
kubectl version |
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 | |
scrypt(){ | |
[ -n "$1" ] && { | |
echo '. <(echo "$(tail -n+2 $0 | base64 -d | mcrypt -dq)"); exit;' > $1.scrypt | |
cat $1 | mcrypt | base64 >> $1.scrypt | |
chmod +x $1.scrypt | |
} | |
} |
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
<?php | |
function random_bytes($bytes) { | |
$secure = true; | |
$buf = openssl_random_pseudo_bytes($bytes, $secure); | |
if ($buf !== false && $secure && strlen($buf) === $bytes) { | |
return $buf; | |
} | |
} |
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
# .bashrc | |
# alias for "d2u <filename>" which converts line endings from dos to unix using sed | |
alias d2u='function _d2u(){ echo "Converting line endings from Dos2Unix."; sed -i "s/\r$//" "$1"; };_d2u' | |
# alias for "untar" which executes "tar -xvf" to extract a tarball | |
alias untar='tar -xvf' | |
# alias for "tarball" which executes "tar cvzf" to create a tarball | |
alias targz='tar cvzf' |
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
## Bash lets you use CTRL+X CTRL+E to edit-and-execute a command | |
## This will allow you to set up VS Code as the editor for this (and other Bash edit functions) | |
echo "export VISUAL=\"code -n -w\"" >> ~/.bashrc | |
source ~/.bashrc | |
## Then when you're typing a long command and need to change something or otherwise want better | |
## editing control over a command, simply hit CTRL+X CTRL+E and edit the command, then save | |
## and exit VS Code and the command will execute | |
## For Sublime Text |