Skip to content

Instantly share code, notes, and snippets.

🏠
Working from home

Anibal anibalardid

🏠
Working from home
Block or report user

Report or block anibalardid

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@anibalardid
anibalardid / ubuntu-minimize-dock.sh
Created Nov 8, 2019
ubuntu minimize window when click in dock
View ubuntu-minimize-dock.sh
#set
gsettings set org.gnome.shell.extensions.dash-to-dock click-action 'minimize'
#reset to default
gsettings reset org.gnome.shell.extensions.dash-to-dock click-action
@anibalardid
anibalardid / ansible-git-pull.txt
Created Oct 4, 2019
ansible recipe git pull in directory
View ansible-git-pull.txt
tasks:
- name: pull from git
git:
repo: git@gitlab.com:repo.git
dest: /path/destiny
update: yes
version: master
@anibalardid
anibalardid / find-directories-more-than-250M.sh
Created Sep 26, 2019
Find directories that size is more than 250 MB
View find-directories-more-than-250M.sh
du -h -d 1 -t 250M . | sort -hr > more250M.txt
@anibalardid
anibalardid / delete_host_redirect_https.txt
Created Sep 9, 2019
chrome redirect localhost to https fix
View delete_host_redirect_https.txt
in chrome:
chrome://net-internals/#hsts
go to the bottom, put url and hit DELETE
@anibalardid
anibalardid / apt-purge.txt
Created Sep 6, 2019
remove residual config apt packages purge
View apt-purge.txt
dpkg -l | grep '^rc' | awk '{print $2}' | xargs dpkg --purge
@anibalardid
anibalardid / ulauncher-error-github.log
Created Aug 16, 2019
ulauncher save github extension preferences error
View ulauncher-error-github.log
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
@anibalardid
anibalardid / phplint.sh
Created Aug 1, 2019
php lint and check syntax error
View phplint.sh
#!/bin/bash
#display error in php lint
find . -name \*.php -exec php -l "{}" \; | grep parsing
@anibalardid
anibalardid / add_error_log_vhosts.sh
Created Jul 26, 2019
search and add error_log to lsws vhosts
View add_error_log_vhosts.sh
#!/bin/bash
#DIRVHOSTS="/usr/local/lsws/conf/vhosts"
DIRVHOSTS="."
cd $DIRVHOSTS
echo "******************************************"
@anibalardid
anibalardid / edit-virtualhost.sh
Last active Jun 26, 2019
agregar filtro para no poder ejecutar php en carpeta wp-content/uploads
View edit-virtualhost.sh
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'
View replace-with-content.sh
find -iname "*.conf" -exec sed -i -e '/<\/Directory>/{r newcontent.txt' -e 'd}' {} \;
You can’t perform that action at this time.