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/env python3 | |
import json | |
import requests | |
from sys import argv | |
R = { | |
'headers':{}, | |
'url': None, | |
'data': None | |
} |
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 | |
# This scripts pops up a notification in X if your RAM is occupied more | |
# than a certain value (default: 90%). | |
# Memory is checked every 3 seconds, alerts pops up every 30 seconds. | |
checkmemory () { | |
while | |
sleep 3 | |
TOTAL=`free -tw | grep Mem | tr -s ' ' | cut -d ' ' -f 2` | |
USED=`free -tw | grep Mem | tr -s ' ' | cut -d ' ' -f 3` |
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
rsync -avz -P --compress-level=9 $ORIGIN $USER@$HOST:$DESTDIR |
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 | |
# Inutility that speaks all the numbers of a specified countdown | |
# You can also specify the language (e.g. en, it, da) | |
if [ -v $@ ] | |
then | |
underline=`tput smul` | |
nounderline=`tput rmul` | |
echo "Usage: countdown ${underline}SECONDS${nounderline} [${underline}LANGUAGE${nounderline}]" |
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
conky.config={ | |
double_buffer = true, | |
own_window = true, | |
own_window_argb_visual = true, | |
own_window_class = 'Conky', | |
own_window_hints = 'undecorated,below,sticky,skip_taskbar,skip_pager', | |
own_window_transparent = true, | |
own_window_type = 'dock', | |
update_interval=1, | |
no_buffers = true, |
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
# This is useful for get memory data to use, for example, with conky. | |
# this is ok, at least, for my graphic card. | |
free_graphic_memory=`nvidia-smi | sed -n "9p" | cut -d '|' -f 3 | cut -d '/' -f 1 | xargs` | |
total_graphic_memory=`nvidia-smi | sed -n "9p" | cut -d '|' -f 3 | cut -d '/' -f 2 | xargs` |