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 / behat.yml
Created April 16, 2014 12:39
How integreate 'selectors' with Behat (regon_map is requreid to work with selectors)
default:
paths:
features: 'features'
extensions:
Behat\MinkExtension\Extension:
goutte: ~
selenium2: ~
base_url: https://production.server/
Drupal\DrupalExtension\Extension:
blackbox: ~
@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 ()
{
@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
@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 / polon.php
Created March 27, 2015 11:49
Polish radiostations from linux CLI / Polskie radiostacje z linii poleceń
<?php
define('INDENT', ' ');
// Radio list
$radiostations = [
'trojka' => 'mms://stream.polskieradio.pl/program3_wma10',
'dwojka' => 'mms://stream.polskieradio.pl/program2_wma10',
'jedynka' => 'mms://stream.polskieradio.pl/program1_wma10',
'luz' => 'http://radioluz.pwr.wroc.pl/listen.pls',
### 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:

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:

@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 / filed_types_D8_output.txt
Created January 12, 2016 10:38
Drupal 8 filed types with descriptions
Label: Comments
Machine name: comment
Descritpion: This field manages configuration and presentation of comments on an entity.
Provider: comment
---
Label: Date
Machine name: datetime
Descritpion: Create and store date values.
Provider: datetime
---