This file contains hidden or 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 | |
set -euo pipefail | |
# Author: deoomen (https://github.com/deoomen) | |
# Inspired by: https://earlruby.org/2023/12/posting-to-google-spaces-from-bash/ | |
# List of webhooks from Google Spaces. | |
declare -A CHANNELS | |
CHANNELS=( | |
["channel1"]="https://chat.googleapis.com/v1/spaces/...", |
This file contains hidden or 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 | |
# | |
# █▀█ █▀▀ █ █▀▀ █▀█ █▀ █▀▀ █▀█ | |
# █▀▄ ██▄ █▄▄ ██▄ █▀█ ▄█ ██▄ █▀▄ | |
# | |
# Credits: | |
# - Author: deoomen (https://github.com/deoomen) | |
# - Inspired by: https://gist.github.com/jv-k/703e79306554c26a65a7cfdb9ca119c6 | |
# |
This file contains hidden or 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
<?xml version="1.0" encoding="UTF-8"?> | |
<ruleset name="phpmd" | |
xmlns="http://pmd.sf.net/ruleset/1.0.0" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://pmd.sf.net/ruleset/1.0.0 http://pmd.sf.net/ruleset_xml_schema.xsd" | |
xsi:noNamespaceSchemaLocation="http://pmd.sf.net/ruleset_xml_schema.xsd"> | |
<description>PHP Mess Detector ruleset by deoomen</description> | |
<rule ref="rulesets/codesize.xml"/> | |
<rule ref="rulesets/controversial.xml"/> | |
<rule ref="rulesets/design.xml"/> |
This file contains hidden or 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
<?xml version="1.0" encoding="UTF-8"?> | |
<ruleset name="phpcs"> | |
<description>PHP Code Sniffer ruleset by deoomen</description> | |
<rule ref="Generic.Classes.DuplicateClassName"/> | |
<rule ref="Generic.CodeAnalysis.EmptyStatement"/> | |
<rule ref="Generic.CodeAnalysis.ForLoopShouldBeWhileLoop"/> | |
<rule ref="Generic.CodeAnalysis.ForLoopWithTestFunctionCall"/> | |
<rule ref="Generic.CodeAnalysis.JumbledIncrementer"/> | |
<rule ref="Generic.CodeAnalysis.UnconditionalIfStatement"/> | |
<rule ref="Generic.CodeAnalysis.UnnecessaryFinalModifier"/> |
This file contains hidden or 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
[xdebug] | |
xdebug.remote_enable = 1 | |
xdebug.remote_autostart = 1 | |
xdebug.collect_assignments = 1 | |
xdebug.collect_includes = 1 | |
xdebug.collect_params = 1 | |
xdebug.collect_return = 1 | |
; xdebug.collect_vars = 1 | |
xdebug.var_display_max_depth = 5 | |
; xdebug.var_display_max_children = 256 |
This file contains hidden or 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
Set WshShell = WScript.CreateObject("WScript.Shell") | |
If WScript.Arguments.Length = 0 Then | |
Set ObjShell = CreateObject("Shell.Application") | |
ObjShell.ShellExecute "wscript.exe" _ | |
, """" & WScript.ScriptFullName & """ RunAsAdministrator", , "runas", 1 | |
WScript.Quit | |
End if | |
Set objShell = WScript.CreateObject("WScript.Shell") | |
objShell.CurrentDirectory = "<bat_dir_path>" |
This file contains hidden or 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 | |
function fun_serviceManage { | |
if [[ `pgrep -c $1` -ne "0" ]] ; then | |
echo -e "$2 \e[92mworking. \e[91mDisable\e[39m? [Y/n]: \c" | |
read -n 1 answer | |
echo "" | |
if [[ $answer = "Y" || $answer = "y" || $answer = "" ]] ; then | |
`sudo service $1 stop` | |
echo -e "$2 \e[91mdisabled\e[39m." |
This file contains hidden or 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 | |
clear | |
# define global vars | |
apacheStatus="" | |
buildMenu() { | |
# clear | |
printf "1. Apache is %s" |