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
find -iname "*.conf" -print | xargs sed -i 's|</Directory>|</Directory>\n\nfirstline\nsecondline\notherlines\n|g' |
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 | |
FOLDER="." | |
echo "******************************************" | |
for file in $(find -iname "*.conf") | |
do | |
echo "file:" $file | |
sitename="$(sed s/.conf//g <<< $file)" | |
sitename="$(sed s/-le-ssl//g <<< $sitename)" | |
sitename="$(sed -e 's/\.\///g' <<< $sitename)" |
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
find -iname "*.conf" -exec sed -i -e '/<\/Directory>/{r newcontent.txt' -e 'd}' {} \; |
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
find -iname "*.conf" -print | xargs sed -i 's|</Directory>|</Directory>\n\t<LocationMatch "wp-content/uploads/.*(?i)\.(php)$">\n\t\tOrder Deny,Allow\n\t\tDeny from All\n\t</LocationMatch>\n|g' | |
#mejora: | |
find -iname "*.conf" -print | xargs sed -i 's|.(php)|\\.ph\(\?\:p\[345\]\?\|t\|tml\)|g' | |
#habilitar access log nuevamente | |
find -iname "*.conf" -print | xargs sed -i 's|\#CustomLog \${APACHE_LOG_DIR}|CustomLog \${APACHE_LOG_DIR}|g' | |
find -iname "*.conf" -print | xargs sed -i 's|CustomLog \/dev\/null|\#CustomLog \/dev\/null|g' |
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 | |
#DIRVHOSTS="/usr/local/lsws/conf/vhosts" | |
DIRVHOSTS="." | |
cd $DIRVHOSTS | |
echo "******************************************" |
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 | |
#display error in php lint | |
find . -name \*.php -exec php -l "{}" \; | grep parsing |
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
2019-08-16 13:34:08,491 | INFO | ulauncher.ui.windows.PreferencesUlauncherDialog: prefs_extension_update_prefs() | Update extension preferences: {'pref.kw_search': 'ghsearch', 'callback': '__jp2', 'pref.access_token': '', 'pref.kw': 'gh', 'pref.kw_gists': 'gists', 'id': 'com.github.brpaz.ulauncher-github', 'pref.kw_repos': 'ghrepos'} | |
2019-08-16 13:34:08,492 | ERROR | ulauncher.ui.windows.PreferencesUlauncherDialog: on_scheme_callback() | Unexpected API error. KeyError: com.github.brpaz.ulauncher-github | |
Traceback (most recent call last): | |
File "/usr/lib/python2.7/dist-packages/ulauncher/ui/windows/PreferencesUlauncherDialog.py", line 160, in on_scheme_callback | |
resp = rt.dispatch(self, scheme_request.get_uri()) | |
File "/usr/lib/python2.7/dist-packages/ulauncher/util/Router.py", line 49, in dispatch | |
return callback(context, url_params) | |
File "/usr/lib/python2.7/dist-packages/ulauncher/ui/windows/PreferencesUlauncherDialog.py", line 368, in prefs_extension_update_prefs | |
controller = ExtensionServer.g |
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
dpkg -l | grep '^rc' | awk '{print $2}' | xargs dpkg --purge |
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
in chrome: | |
chrome://net-internals/#hsts | |
go to the bottom, put url and hit DELETE |
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
du -h -d 1 -t 250M . | sort -hr > more250M.txt |