This has been incorporated in a small library.
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
require 'thread' | |
require 'fileutils' | |
procs=8 | |
host="" | |
user="" | |
pass="" | |
db="" | |
path="" |
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
ps aux | grep $(sudo lsof -i tcp -nP | grep "15245 (" | head -n 1 | awk '{print $2}') |
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
\ParameterConfigRepository::shouldReceive('findOneByParameterCodeAndPartner') | |
->once() | |
->andReturnUsing(function ($code) { | |
$params = [ | |
'ftp' => '127.0.0.1', | |
'user' => 'fernandinho', | |
'password' => '1234' | |
]; | |
return $params[$code]; |
Use your service account's key JSON file to get an access token to call Google APIs.
Good for seeing how things work, including the creation of JWT token.
To create a JWT token, you can replace create-jwt-token.sh
script with tools like step.
If you just want to get an access token for a service account,