Skip to content

Instantly share code, notes, and snippets.

Leo Gallego leogallego

Block or report user

Report or block leogallego

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
View gist:9f034f4d5de2e7590d811c174b951c97
# If the key already exists in another user (or machine user) or is a deploy key in a project/repo, it can't be used anywhere else.
# Github doesn't inform the owner of the key, the project or any other data about the conflict
# You only see the key fingerprint in every project or user, and a user filed description (text, might not have relation to actual key)
#
# How to see a github compatible fingerprint from a public id_rsa key file:
ssh-keygen -E md5 -lf /$PATH/$ID_RSA_FILE
View gist:ac18185e54e5dcaf598a748823f76832
# Set all directories permissions to 755 / rwx-r-x-r-x
find . -type d -exec chmod 755 {} \;
# Set all files permissions to 644 / rw-r--r--
find . -type f -exec chmod 644 {} \;
# Set all directories permissions to 555 / r-x-r-x-r-x (read only)
find . -type d -exec chmod 755 {} \;
# Set all files permissions to 444 / r--r--r-- (read only)
View gist:f0cb6d49d87b776d70c45b246a71f4a6
In VIM:
:w !sudo tee %
Or in .vimrc, map w!! to the command above:
cmap w!! w !sudo tee > /dev/null %
View whatsmyip
#!/bin/bash
ip=$(curl -s https://api.ipify.org)
echo "My public IP address is: $ip"
@leogallego
leogallego / Cloud_VPS_Price_Breakdown.md
Last active Jun 15, 2019 — forked from justjanne/Price Breakdown.md
Cloud VPS and Dedicated Server Price Breakdown for DigitalOcean, Amazon AWS LightSail, Vultr, Linode, OVH, Hetzner, Scaleway/Online.net
View Cloud_VPS_Price_Breakdown.md
View zimbra-delete-queue-from.sh
#To first see what would be deleted. As root:
```
/opt/zimbra/postfix/sbin/postqueue -p | egrep -v '^ *\(|-Queue ID-' \
| awk 'BEGIN { RS = "" } { if ($7 == "email@domain.com") print $1} ' | tr -d '*!'
```
#If you get error about egrep, you might need to use this syntax:
View neovim-update-plugins
:PlugClean
:PlugInstall
:PlugUpdate
:UpdateRemotePlugins
View bna.sh
#!/bin/bash
while [ 1 ];
do
echo -n "BNA cotizacion `date` -----> " ;
curl http://www.bna.com.ar/Personas 2> /dev/null | grep -a \<td| sed '3q;d'|sed 's|<[^>]*>||g' | sed -e 's/^[ \t]*//';
sleep 30;
done;
View rio.sh
#!/bin/bash
while [ 1 ];
do echo -n "RIO cotizacion `date` -----> " ;
curl https://banco.santanderrio.com.ar/exec/cotizacion/index.jsp 2> /dev/null | grep -a \<td\> | head -n 3 | cut -d " " -f 2 | cut -d "<" -f 1 | tail -n 1;
sleep 30;
done;
You can’t perform that action at this time.