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 | |
ping -c 1 1.1.1.1 | |
received=$? | |
echo $received | |
if [[ $received -ne 0 ]] ; then | |
service NetworkManager restart | |
fi |
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
Ingredientes pudim de leite condensado: | |
2 latas de leite condensado | |
1 medida da lata de leite | |
2 ovos + 1 gema | |
1 xícara de açúcar cristal | |
Levar o leite condensado, o leite e os ovos ao liquidificador. | |
Bater por pelo menos 5 minutos. | |
Deixar descansando por pelo menos outros 5 minutos, enquanto faz a calda. | |
Esse processo é importante para que o pudim fique sem furinhos. |
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
#!/usr/bin/python3 | |
import os | |
import random | |
import subprocess | |
diretorio = "sinal/" | |
arquivos = os.listdir(diretorio) | |
arquivo_aleatorio = random.choice(arquivos) | |
subprocess.run(["mpg123", os.path.join(diretorio, arquivo_aleatorio)]) |
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
paywall* | |
*paywall | |
! Los Angeles Times (latimes.com) | |
||californiatimes.com^*/Bootstrap.js$script | |
||californiatimes.com/meter/$script | |
||californiatimes.com/meteringjs/$script | |
||californiatimes.com/newsletter-campaign-manager/$script | |
! The New York Times (nytimes.com) | |
||meter-svc.nytimes.com^ | |
||nytimes.com^*/metered_assets/ |
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
import os | |
# Try to connect to a socket | |
def isOpen(ip,port): | |
import socket | |
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) | |
s.settimeout(2) | |
try: | |
s.connect((ip, int(port))) | |
s.shutdown(2) |
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 | |
for i in *.webp; do ffmpeg -i "$i" "${i%.webp}.jpg" ; done | |
for i in *.webm; do ffmpeg -i "$i" "${i%.webm}.mp4" ; done |
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
To enable tap to click on touchpad using libinput create a file in Xorg config: | |
$ touch /etc/X11/xorg.conf.d/99-synaptics-overrides.conf | |
And add the following configuration: | |
Section "InputClass" | |
Identifier "touchpad overrides" | |
Driver "libinput" | |
MatchIsTouchpad "on" | |
Option "Tapping" "on" |
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
#!/usr/bin/python3 | |
# coding=UTF-8 | |
import tweepy | |
import datetime | |
import shelve | |
import re | |
#Block Pattern | |
bp = re.compile(r"^\D+\d{5,}$") |
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
#!/usr/bin/python3 | |
#Checks for hosts alive in the network. | |
#If all hosts are offline, assume that power has failed | |
#and initiate a shutdown | |
#Luiz Fellipe Carneiro - 01/2021 | |
import socket | |
import os |
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
///////////////////////////////////////////////////////////////////////////// | |
// Land | |
///////////////////////////////////////////////////////////////////////////// | |
// Make groundfall. Try to avoid a rapid unplanned disassemble. | |
// Warranty void if used with air | |
// | |
// Usage: RUN LANDVAC(<mode>,<latitude>,<longitude>). | |
// | |
// Parameters: | |
// <mode>: Can be TARG, COOR or SHIP. |