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
import requests | |
#specify the api of coinmarketcap | |
url = https://api.coinmarketcap.com/v1/ticker/?convert=EUR&Limit=10 | |
# for every coin we find on the website | |
for coin in requests.get(url).json(): | |
print(coin['name], coin['price_usd’]) |
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
import urllib.parse | |
import urllib.request | |
from bs4 import BeautifulSoup | |
from pprint import pprint | |
def urlReader(url): | |
print("") | |
print("fetching data from coinmarketcap.com") | |
req = urllib.request.Request(url) | |
resp = urllib.request.urlopen(req) |
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
dbus-send --session --dest=org.kde.plasmashell --type=method_call /PlasmaShell org.kde.PlasmaShell.evaluateScript 'string: | |
var Desktops = desktops(); | |
for (i=0;i<Desktops.length;i++) { | |
d = Desktops[0]; | |
d.wallpaperPlugin = "org.kde.image"; | |
d.currentConfigGroup = Array("Wallpaper", | |
"org.kde.image", | |
"General"); | |
d.writeConfig("Image", "file:'$1'"); | |
}' |
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 vi /etc/udev/rules.d/90-xhc_sleep.rules | |
# disable wake from S3 on XHC1 | |
SUBSYSTEM=="pci", KERNEL=="0000:00:14.0", ATTR{power/wakeup}="disabled" |
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
#definde ssh | |
ssh_connection="root@189.232.123.XX" | |
password="admin" | |
sshpass -p $password ssh $ssh_connection #":command here:" | |
#ls command | |
ssh_connection="root@189.232.123.XX" | |
password="admin" | |
command="ls" |
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
find $directory_path -name $file_name | wc -l |
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
# Colourise the output | |
YEL='\033[1;33m' # Yellow | |
NCL='\033[0m' # No Color | |
RED='\033[0;31m' # REDs | |
printf "%*s\WITH THE NAME:\t${YEL}%s${NCL}\n" $((indent+4)) '' "$name.mp3" |
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
index = [y for x in os.walk(base_path) for y in glob(os.path.join(x[0], '*.jpg'))] |
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 eopkg upgrade | |
sudo eopkg install docker zsh docker-compose vscode nodejs | |
sudo eopkg install -c system.devel | |
sudo systemctl enable docker | |
sudo systemctl start docker | |
sudo usermod -aG docker daeh |
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
const laf = Engine.createGlobalScriptLookAndFeel(); | |
const BORDER = 3; | |
const PADDING = 10; | |
const GLOW_RING_SIZE = 3; | |
const GLOW_AMOUNT = 3; | |
const BLACK = '0x000000'; | |
const RED_COLOUR = '0xFBFF0000'; | |
const BLUE_COLOUR = '0xFB0023FF'; | |
const BORDER_COLOR = '0xDFDFDF'; |
OlderNewer