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
1 - Install following these instructions: https://tfswitch.warrensbox.com/Install/ | |
2 - If you run into permission related issues, uninstall (https://tfswitch.warrensbox.com/Upgrade-or-Uninstall/) | |
and install again using these instructions: https://tfswitch.warrensbox.com/Troubleshoot/ | |
3 - Add export PATH=$PATH:$HOME/.bin:$HOME/bin to your .bash_profile. This will make tfswitch and terraform commands available for you. | |
4 - OPTIONAL: Add following to your .bash_profile to preserve existing configurations such as colors. | |
if [ -f "${HOME}/.bashrc" ] ; then |
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
runas /user:ComputerName\Username /savecred "C:\path\to\file.exe" |
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
/** | |
* Save this as an app script function on yout Google Sheets and start using it. | |
* Usage: =SNAKE_CASE(A1) | |
*/ | |
function SNAKE_CASE(str) { | |
return str | |
.match(/[A-Z]{2,}(?=[A-Z][a-z0-9]*|\b)|[A-Z]?[a-z0-9]*|[A-Z]|[0-9]+/g) | |
.filter(Boolean) | |
.map(x => x.toLowerCase()) | |
.join("_"); |
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/python | |
import os | |
import glob | |
import sys | |
# variables | |
srcBase = "lib/nodejs/src/" | |
cwd = os.getcwd() |
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
# Following should fix npm install errors like "stack Error: not found: make" | |
sudo apt-get install build-essential | |
# Elastic Beabstalk temp dployment folder | |
/tmp/deployment/application | |
# Elastic Beabstalk final dployment folder | |
/var/app/current | |
# Following will add /bin/node and /bin/npm symlinks to Beanstalk EC2 based on latest node installation available. |
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
# set the dotglob shell optio if you want to move dot (hidden) files | |
shopt -s dotglob | |
# move all files, folders and hidden (if above option set) to a destination folder. | |
mv ~/source/* ~/destination |
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
# custom PhpStorm properties | |
project.tree.structure.show.url=false | |
ide.tree.horizontal.default.autoscrolling=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
// Let's assume the "util.js" layer file is saved here: /lib/helpers/nodejs/util.js | |
// You will refer to the layer like below (according to AWS docs). | |
const Util = require('/opt/nodejs/src/util'); | |
// Above will work, however WebStorm will give you annoying the "unresolved" warning | |
// and will not show the code completion. As a solution, create a symlink in your project | |
// to simulate the layer mount path. See below: | |
// ln -s lib/helpers opt | |
// MAJOR DOWNSIDE: This will only work for a single layer. |
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
cat /etc/system-release | |
# Amazon Linux release 2 (Karoo) | |
uname -a | |
# Linux ip-10-0-0-102.ec2.internal 4.14.101-91.76.amzn2.x86_64 #1 SMP Tue Feb 19 17:51:33 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux | |
cat /etc/os-release | |
# NAME="Amazon Linux" | |
# VERSION="2" | |
# ID="amzn" |