- We need to authenticate to multiple private external repositories using credentials stored in a file
- We don't want use private/public RSA keys with ssh
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 | |
# Specifica l'ID del layer di overlay2 | |
OVERLAY_ID="$1" | |
# Cerca il container associato all'ID del layer | |
CONTAINER_ID=$(sudo grep -l -r "$OVERLAY_ID" /var/lib/docker/overlay2/*/link | \ | |
sed -n 's|.*/overlay2/\(.*\)/link|\1|p') | |
# Ottieni il nome del container |
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
/* é necessario poi circorscivere la regola usando un selettore dedicato oltre al sibling css */ | |
body link[rel=alternate][href*="/collections/"] ~ div > div, | |
body link[rel=alternate][href*="/products/"] ~ div > div,{ | |
background-color: red !important; | |
} |
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 | |
az devops project list | jq ".value[].name" -r | while read -r PROJECT ; | |
do | |
az repos list --project "$PROJECT" | jq ".[].remoteUrl" -r | while read -r GIT_URL ; do | |
rm -fr "$GIT_URL" | |
git clone "$GIT_URL" | |
done | |
done |
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 | |
## NOTA: questo script non va lanciato direttamente ma incluso tramite source o . | |
if docker-machine status default > /dev/null ; | |
then | |
echo "Creazione default docker machine" | |
docker-machine create default | |
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 | |
/** | |
* Credits to : | |
* @see https://gist.github.com/psampaz/7f2aad5d1d54eeeec8ae | |
*/ | |
use GuzzleHttp\Handler\CurlMultiHandler; | |
use GuzzleHttp\HandlerStack; | |
use GuzzleHttp\Middleware; |
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
[Unit] | |
Description=Write Network Configurations Metadata to /run/network/meta-environ | |
Requires=network-online.target | |
After=network-online.target | |
Before=containerd.service docker.service | |
[Service] | |
Type=oneshot | |
RemainAfterExit=yes | |
ExecStart=/bin/bash -c "FILE=/run/network/meta-environ ; hostname -i | sed -e '$ s/^/HOST_ADDRESS_IPV4=/' > $FILE" |
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
/** | |
* La variabile $checkedField che vedi riferita arriva da una variabile lato server che contiene | |
* il nome della colonna da utilizzarsi per settare in automatico il campo del model sul checkbox click | |
* | |
* Puo anche valere null o false, in quel caso il valore Javascript deve corrispondere a null o false, per | |
* fare questo in php si usa il metodo json_encode | |
*/ | |
/** | |
* Determina quale e' la colonna tenuta in sync con la checkbox |
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 | |
/** | |
* Inspired from | |
* 1. https://github.com/laravel/framework/blob/5.6/src/Illuminate/Mail/TransportManager.php | |
* 2. https://github.com/laravel/framework/blob/5.6/src/Illuminate/Mail/MailServiceProvider.php | |
* | |
* A service provider to register a custom mailer with Dynamic Options ( determined at Dependency Injection Container resolve-time ) | |
* | |
* 1. resolve-time options: host, port, user, password, secure: [tls,ssl] could be determined at DI container resolve-time | |
* 2. global options in mail.dynamic config file |
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 | |
/** | |
* User: matteo.orefice | |
* Date: 16/02/2018 | |
* Time: 16:57 | |
*/ | |
namespace MatteoOrefice\Illuminate\Database\Eloquent\Concerns; |
NewerOlder