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 | |
# Set the working directory with the images | |
image_directory="/home/Pictures/Stålenhag" | |
cd "$image_directory" | |
mkdir 'widescreen' | |
# Iterate over all jpg files in the directory | |
find . -iname "*.jpg" | while read -r image; do |
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
from http.server import BaseHTTPRequestHandler, HTTPServer | |
from urllib.parse import urlparse | |
class RequestHandler(BaseHTTPRequestHandler): | |
def do_POST(self): | |
# Parse the request URL | |
parsed_path = urlparse(self.path) | |
print(parsed_path) | |
# Check if the requested URL is /test |
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
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>SVG Path Extractor</title> | |
<style> | |
body { | |
display: flex; |
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'; |
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
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
# 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
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
#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
#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" |
NewerOlder