- Install "Windows terminal" from Microsoft store
- install WSL:
wsl --install
https://learn.microsoft.com/en-us/windows/wsl/install#update-to-wsl-2 - Change default tab to Ubuntu: Settings -> Startup -> Default Profile -> Ubuntu
- Install Code by running in terminal:
$ code
- set up github access: https://docs.github.com/en/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent?platform=linux
- Install Homebrew https://linux.how2shout.com/install-brew-on-wsl-windows-subsystem-for-linux/. And make sure follow the
Next steps
instruction. - Install zsh:
$ brew install zsh
. Start zsh on every terminal session start:sed -i '$a\\n# Start oh-my-zsh\nif test -t1; then\n exec zsh\nfi' .profile
- Install ohmyzsh
$ sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
This file contains hidden or 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
describe.only('catch of catch', () => { | |
it('does not catches error as expected', done => { | |
function errra () { | |
return new Promise((resolve, reject) => { | |
reject(3) | |
}) | |
} | |
Promise.resolve() |
This file contains hidden or 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
wget https://packages.erlang-solutions.com/erlang-solutions_1.0_all.deb && sudo dpkg -i erlang-solutions_1.0_all.deb | |
sudo apt-get update | |
sudo apt-get install esl-erlang=1:18.3 | |
sudo rm /usr/bin/erl | |
sudo ln -s /usr/lib/erlang/bin/erl /usr/bin/erl | |
sudo apt-get install elixir |
This file contains hidden or 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
Resources: | |
# ============================ Application Load Balancer ============================ | |
LoadBalancer: | |
Type: AWS::ElasticLoadBalancingV2::LoadBalancer | |
Properties: | |
Name: !Ref AWS::StackName | |
Scheme: internet-facing | |
Subnets: !Split |
This file contains hidden or 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
function decrypt_kms { | |
if [ "$#" -ne 1 ]; then | |
echo "Please provide base64 encoded kms-secret (aka. ciphertext-blob), e.g. decrypt_kms aasd123123lkjklj" | |
else | |
echo $(aws kms decrypt \ | |
--ciphertext-blob fileb://<(echo "$1" | base64 -d) \ | |
--output text \ | |
--query Plaintext | base64 --decode | |
) | |
fi |
A. On Windows side
- Make sure Windows version is at least Professional. Or follow this to upgrade. Note Windows upgrade is a piece of shit. Only hope is restart OS when you think upgrade stucks.
- https://docs.docker.com/docker-for-windows/install/ download Docker edge, install it with Hyper-V. Do not use VirtualBox, it does not work with bash.
- start
Docker.exe
B. On Bash side
- install brew on linux http://linuxbrew.sh/
login to server in private subnet hence we can talk to db:
ssh example_server
connect database
psql example_db_url -U example_user example_database
This file contains hidden or 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
CREATE TABLE IF NOT EXISTS `country` ( | |
`id` int(11) NOT NULL AUTO_INCREMENT, | |
`iso` char(2) NOT NULL, | |
`name` varchar(80) NOT NULL, | |
`nicename` varchar(80) NOT NULL, | |
`iso3` char(3) DEFAULT NULL, | |
`numcode` smallint(6) DEFAULT NULL, | |
`phonecode` int(5) NOT NULL, | |
PRIMARY KEY (`id`) | |
) ENGINE=MyISAM DEFAULT CHARSET=latin1; |
The popular open-source contract for web designers and developers by Stuff & Nonsense
- Originally published: 23/12/2008
- Revised date: 15/12/2013
- Original post
This file contains hidden or 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
// @ redux/actions/login.js | |
export function loginStart(username, pw): Promise<void> { | |
return async (dispatch) => { | |
dispatch({ type: 'LOGIN_START' }) | |
try { | |
const userData = await login(username, pw) | |
dispatch(loginSuccess(userData)) | |
} catch (error) { | |
dispatch(loginFailure(error)) | |
} |