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 | |
$filename = './srcApp_KernelDevDebugContainer.xml'; | |
$content = file_get_contents($filename); | |
// the \> at the end of a service definition means this service has no dependencies. | |
preg_match_all('/\<service id="(App.+?)".* autowire="true" .*?\/>/', $content, $matches); | |
$serviceIds = $matches[1]; | |
foreach ($serviceIds as $serviceId) { |
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 | |
# | |
# This script is for people like me running a laptop with external monitor and using the | |
# external monitor as the main output. As main output I want to have the waybar show up | |
# on it. With this script you get waybar on external monitor and when you unplug it - it | |
# will automatically change the display to Your display and vice versa. | |
# | |
# just put the following into your hyprland.conf: | |
# exec-once = waybar | |
# exec-once = ~/.config/hypr/scripts/waybar-monitor-switch.sh |
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 | |
activity=`hamster current` | |
if [[ $activity == "No activity" ]]; then | |
text="" | |
class="" | |
else | |
start_date=`echo $activity | cut -d' ' -f1` | |
start_time=`echo $activity | cut -d' ' -f2` | |
name=`echo $activity | sed 's/[0-9\-]\+\s[0-9\:]\+[[:space:]]\([[:alnum:] \.,@-]\+\)[[:space:]][0-9\:]\+/\1/'` |
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
" :Grep "Peding Transaction" " with fixed strings | |
" :Grep! "\sTransaction" " regex | |
" :Grep \$stateParam | |
" :Grep "Pending Transaction" -g "*.php" " with rg parameters | |
" :Grep "Pending Transaction" vendor/ " with path | |
" :Grep "Pending Transaction" -g "*.php" vendor " with rg parameters and path | |
" rg as :grep | |
set grepprg=rg\ --vimgrep\ --follow\ --hidden | |
set grepformat^=%f:%l:%c:%m |
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 | |
/** | |
* Dot notation for access multidimensional arrays. | |
* | |
* $dn = new DotNotation(['bar'=>['baz'=>['foo'=>true]]]); | |
* | |
* $value = $dn->get('bar.baz.foo'); // $value == true | |
* | |
* $dn->set('bar.baz.foo', false); // ['foo'=>false] | |
* |