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 | |
if [ "$1" == "" ] | |
then | |
echo "Usage: ./parse-url.sh URL/IP" | |
else | |
# Get the html for the URL | |
wget -O $1.html $1 | |
# check if file exists | |
if [ -f $1.html ] | |
then |
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
/*------------------------------------------ | |
Responsive Grid Media Queries - 1280, 1024, 768, 480 | |
1280-1024 - desktop (default grid) | |
1024-768 - tablet landscape | |
768-480 - tablet | |
480-less - phone landscape & smaller | |
--------------------------------------------*/ | |
@media all and (min-width: 1024px) and (max-width: 1280px) { } | |
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 | |
LAN=172.16.1 | |
for ip in $(seq 1 255); do | |
for port in 13 37 30000 3000 1337; do | |
hping3 -S -c 1 -p $port $LAN.$ip >> result.log | |
done | |
done |
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
function update(data, keys, value) { | |
if (keys.length === 0) { | |
return value | |
} | |
let key = keys.shift() | |
if (!key) { | |
data = data || {} | |
if (Array.isArray(data)) { |
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
<select> | |
<option value="AC">Acre</option> | |
<option value="AL">Alagoas</option> | |
<option value="AP">Amapá</option> | |
<option value="AM">Amazonas</option> | |
<option value="BA">Bahia</option> | |
<option value="CE">Ceará</option> | |
<option value="DF">Distrito Federal</option> | |
<option value="ES">Espírito Santo</option> | |
<option value="GO">Goiás</option> |
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
# slugify files | |
$ find . -type f -name "*.jpg" -exec slugify {} \; | |
# convert format | |
$ mogrify -format jpg *.png | |
# Resize images | |
$ mogrify -resize 1500x1500 ./* | |
# Create thumbnails |
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
{ | |
"states": [ | |
{ "id": 11, "name": "Rondônia", "code" : "RO" }, | |
{ "id": 12, "name": "Acre", "code" : "AC" }, | |
{ "id": 13, "name": "Amazonas", "code" : "AM" }, | |
{ "id": 14, "name": "Roraima", "code" : "RR" }, | |
{ "id": 15, "name": "Pará", "code" : "PA" }, | |
{ "id": 16, "name": "Amapá", "code" : "AP" }, | |
{ "id": 17, "name": "Tocantins", "code" : "TO" }, | |
{ "id": 21, "name": "Maranhão", "code" : "MA" }, |
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
Acre|AC | |
Alagoas|AL | |
Amapá|AP | |
Amazonas|AM | |
Bahia|BA | |
Ceará|CE | |
Distrito Federal|DF | |
Espírito Santo|ES | |
Goiás|GO | |
Maranhão|MA |
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
# sudo apt install python-qrtools | |
import qrtools | |
import glob | |
images = sorted(glob.glob('./images/*.png')) | |
qr = qrtools.QR() | |
for image in images: |
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
Compilar arquivos de tradução: | |
$ apt install gettext | |
$ msgcat pt_BR.po | msgfmt -o pt_BR.mo - | |
Excluir comentários (Spam) usando CLI | |
$ wp comment delete $(wp comment list --status=spam --format=ids) | |
$ wp comment delete $(wp comment list --status=hold --format=ids) |
OlderNewer