Skip to content

Instantly share code, notes, and snippets.

View anton-dema's full-sized avatar
💭
Contemplating the vastity

anton-dema

💭
Contemplating the vastity
View GitHub Profile
#!/user/bin/python3
import requests
from requests.exceptions import ConnectTimeout, RequestException
def check_redirect(url, timeout=1):
"""
Questa funzione controlla il tipo di redirect di un URL e restituisce "V18" se è un 301 e "V20" se è un 302.
Args:
url: L'URL da controllare.
@anton-dema
anton-dema / Suspend to RAM fix archlinux thinkpad t470.md
Last active October 30, 2021 19:21
Possibile fix per il problema di random freezes da resume after suspend con ArchLinux e thinkpad T470?

Possibile fix per il problema di random freezes da resume after suspend con ArchLinux e thinkpad T470?

sudo /bin/sh -c "echo 0 > /sys/power/pm_async"

Con la creazione di un servizio per systemd rendiamo persistente la modifica anche al reboot

Copy to /etc/systemd/system/disable-async-power-management.service

[Unit]

Description=Disable asynchronous power management

curl -X POST --data-urlencode 'payload={"channel": "#techlab", "username": "webhookbot", "text": "some memorable text", "icon_emoji": ":uccello:"}' https://hooks.slack.com/services/xxxxxxxxxxxxx/xxxxxxxxxxxx/xxxxxxxxxxxxxxxxxxxxx
Verifying that +antonangelo is my blockchain ID. https://onename.com/antonangelo
#network_interface=eth0 # Self-discovers if commented (at times necessary to set)
media_dir=A,/home/user/Music # Mounted Media_Collection drive directories
media_dir=P,/home/user/Pictures # Use A, P, and V to restrict media 'type' in directory
media_dir=V,/home/user/Videos
friendly_name=Media Server # Optional
inotify=yes # 'no' for less resources, restart required for new media
presentation_url=http://www.mylan/index.php # or use your device static IP http://192.168.0.14:8200/

Il canale broadcast Cpline su #Telegram

Basta andare [qui] (http://telegram.me/cpline) e iniziare a ricevere i nostri messaggi push. Boh qualcuno lo vorrà .

@anton-dema
anton-dema / proud.md
Created September 21, 2015 16:31
A gist which I'm Proud

myusefulconfigs

a neat image

This is the master branch of myusefulconfig

Cc: address@hidden
Signed-off-by: Kevin Wolf <address@hidden>
---
block/mirror.c | 15 ++++++++++-----
1 file changed, 10 insertions(+), 5 deletions(-)
diff --git a/block/mirror.c b/block/mirror.c
index fc4d8f5..b2fb4b9 100644
--- a/block/mirror.c
+++ b/block/mirror.c

Keybase proof

I hereby claim:

  • I am anton-dema on github.
  • I am dema (https://keybase.io/dema) on keybase.
  • I have a public key whose fingerprint is A676 6D7E CB4C C20A 4838 429A 2E67 B30B A988 8C5B

To claim this, I am signing this object:

-----BEGIN PGP MESSAGE-----
Version: GnuPG v2
hQEMA5gi/YUIh4BoAQf/SDoNNhnXTxTZCJKYXOz51aQxyiKmezAMiFoMK6GnmSXm
CkTZ6PaosuhsXjy9scXguiZpJ7vSSDmtbS4Wuv4rS1zxaELnZXY7+ZTm31sTs7mP
+len82tMCJ4h11IoigXScCc/2PVsGcEWvtf6t4bTFb+cqGFhxc5/YQsB4+gd9WDj
dTYCYmrF3U//ygrYFP9PeroWzJdj3YcXUbvBysZ7jS2g9B42fL8XVS25YlblFvGz
XRjZeKizeumYf3Xfg7cFekIvJmTQsw3IlFvIi1LJhcPgpSc4J3QJd7+Bcucrm4RF
0FdAbfFV1qqYKkcJoMNazeT+QFBBjLQH0Ovc5xdzNNJUAerh8gJ1sE/WRTDKkjAQ
BlmUgG5Yfhi9FxxJFB9fW0hMBxW3/QijEyC4vc916sAMEMaHNpAMRVZP3iiVec+x