Skip to content

Instantly share code, notes, and snippets.

View sobi3ch's full-sized avatar
🎯
Focusing

Piotr Sobieszczański sobi3ch

🎯
Focusing
View GitHub Profile
@sobi3ch
sobi3ch / aws.setup-credencials
Created September 9, 2019 17:10
After downloading default user accessKeys.csv file from AWS console you can setup default profile with following bash function
aws.setup-credencials ()
{
FILE=$HOME/accessKeys.csv;
if test -f "$FILE"; then
echo "Reading from $FILE";
aws configure set aws_access_key_id $(tail -n1 $HOME/accessKeys.csv | cut -d, -f1);
aws configure set aws_secret_access_key $(tail -n1 $HOME/accessKeys.csv | cut -d, -f2);
else
echo "Missing $FILE";
fi
{
"variables": {
"aws_access_key": "",
"aws_secret_key": ""
},
"builders": [{
"type": "amazon-ebs",
"access_key": "{{user `aws_access_key`}}",
"secret_key": "{{user `aws_secret_key`}}",
"region": "eu-north-1",
@sobi3ch
sobi3ch / custom-cloud-commands
Last active February 14, 2023 23:36
whoami in az and aws cli versions + get-policy-document for aws
# general
alias aws.whoami='aws iam get-user --query User.Arn --output text'
alias az.whoami='az ad signed-in-user show --query userPrincipalName --output tsv'
# In ~/.aws/credencials|config leave [default] profile empty and name it each one of it so `aws-env -l` can list all of them
# aws.profile # show current profile
# aws.profile profile-name # set profile name
# Double tab completion works
aws.profile ()
{

Keybase proof

I hereby claim:

  • I am sobi3ch on github.
  • I am soni3ch (https://keybase.io/soni3ch) on keybase.
  • I have a public key ASC3xMKs2FnzaIsqFM3KBc8baBaVcGca6wYAqVFZThaohAo

To claim this, I am signing this object:

### Keybase proof
I hereby claim:
* I am sobi3ch on github.
* I am sobi3ch (https://keybase.io/sobi3ch) on keybase.
* I have a public key ASAhA2_kzEkJY2jOIygH631Vou_-pCkm9GCzUTeK-gRSkgo
To claim this, I am signing this object:
@sobi3ch
sobi3ch / settings.json
Created May 14, 2021 04:48
vscode visible indentGuidesStroke and activeBorder
"workbench.colorCustomizations": {
"tree.indentGuidesStroke": "#ff9d00",
"tab.activeBorder": "#ff9d00",
},
@sobi3ch
sobi3ch / laravel-sail-with-devcontainers.md
Created November 19, 2021 05:09
Laravel Sail with devcontainers

Start new Laravel Sail project with devcontainers.

curl -s "https://laravel.build/your-project-name?with=mariadb&devcontainer" | bash

Available services include:

  • mysql
  • pgsql
  • mariadb