alias command-stack='current_dir=$(pwd); cd /var/www/any-dir/; cmd-one; cmd-two; cd "${current_dir}"'Example:
alias proxy='current_dir=$(pwd); cd /var/www/docker-ports-proxy/; make; cd "${current_dir}"'#linux #bash #alias #cd #shell #sh #proxy #script
Please open Telegram to view this post
VIEW IN TELEGRAM
Please open Telegram to view this post
VIEW IN TELEGRAM
<?php
/**
* Converts a JSON string to PHP array code using the new square bracket syntax with proper indentation
*
* @param string $jsonString JSON string to convert
* @return string PHP code representing the array
*/
function jsonToPhpArrayCodeNewSyntax($jsonString) {
// Decode the JSON string to a PHP array
$array = json_decode($jsonString, true);
// Check for decoding errors
if (json_last_error() !== JSON_ERROR_NONE) {
return 'Error decoding JSON: ' . json_last_error_msg();
}
// Convert the array to PHP code with square bracket syntax
return '$data = ' . arrayToPhpCode($array) . ';';
}
/**
* Recursively converts an array to PHP code using square bracket syntax with proper indentation
*
* @param mixed $array The array to convert
* @param int $indentLevel Current level of indentation
* @return string PHP code representing the array
*/
function arrayToPhpCode($array, $indentLevel = 0) {
if (!is_array($array)) {
return var_export($array, true);
}
$code = "[\n";
$indentation = str_repeat(' ', $indentLevel + 1);
foreach ($array as $key => $value) {
$code .= $indentation;
$code .= is_int($key) ? '' : var_export($key, true) . ' => ';
$code .= arrayToPhpCode($value, $indentLevel + 1) . ",\n";
}
$code .= str_repeat(' ', $indentLevel) . "]";
return $code;
}
$jsonString = <<<JSON
{
"name": "Roman",
"age": 27,
"city": "Omsk",
"address": {
"street": "Lenina",
"number": 26
}
}
JSON;
echo jsonToPhpArrayCodeNewSyntax($jsonString) . PHP_EOL;
Input:
{
"name": "Roman",
"age": 27,
"city": "Omsk",
"address": {
"street": "Lenina",
"number": 26
}
}Output:
$data = [
'name' => 'Roman',
'age' => 27,
'city' => 'Omsk',
'address' => [
'street' => 'Lenina',
'number' => 26,
],
];
#php #js #json #javascript #converter #gpt
Please open Telegram to view this post
VIEW IN TELEGRAM
Please open Telegram to view this post
VIEW IN TELEGRAM
Please open Telegram to view this post
VIEW IN TELEGRAM
π₯2
Please open Telegram to view this post
VIEW IN TELEGRAM
Please open Telegram to view this post
VIEW IN TELEGRAM
Please open Telegram to view this post
VIEW IN TELEGRAM
aqua.gif
16.6 MB
π₯1
- Click Class in Tree View
- Context Menu
- Diagram
- Show Diagram ... / Ctrl + Alt + Shift U
- Click Class on Diagram
- Show Implementations / Ctrl + Alt + B
- Ctrl + A
- Enter
- Click on Needed Class
- Context Menu
- Selected Element Actions
- Jump to Source / F4
#PhpStorm #JetBrains #idea #intelijidea #graph #class #tree #extends #implements #view #parent #child #diagram
Please open Telegram to view this post
VIEW IN TELEGRAM
cd ~/Desktop/ && nano daily.sh && chmod +x daily.sh
Get Deeplink from Chrome Dev Tools and paste in daily. sh instead of "<deeplink>"
xdg-open "<deeplink>"
In result you must have something like:
xdg-open "zoommtg://zoom.us/join?action=join&confno=***&pwd=***&confid=***&browser=chrome"
Or Create Alias, if you like terminal:
alias daily='xdg-open "zoommtg://zoom.us/join?action=join&confno=***&pwd=***&confid=***&browser=chrome"'
#zoom #alias #script #desktop #deeplink #xdg
Please open Telegram to view this post
VIEW IN TELEGRAM
1. Check vendor changes
composer status -v
Output:
You have changes in the following dependencies:
/var/www/yout-project/vendor/symfony/var-dumper:
M VarDumper.php
or
No local changes
2. Rollback vendor changes
composer reinstall "*" --no-interaction
#composer #php #status #install #reinstall #hint #hints
Please open Telegram to view this post
VIEW IN TELEGRAM
π1
Please open Telegram to view this post
VIEW IN TELEGRAM