Skip to content

Instantly share code, notes, and snippets.

View GrgoMariani's full-sized avatar
:octocat:
Slow is smooth, smooth is fast

Grgo Mariani GrgoMariani

:octocat:
Slow is smooth, smooth is fast
View GitHub Profile
@GrgoMariani
GrgoMariani / bing-wallpaper-download.sh
Created October 4, 2025 12:05
Bing wallpaper downloader
#!/bin/bash
## USAGE:
## sudo ./bing-wallpaper-download.sh
## DESCRIPTION:
## Downloads the latest bing wallpaper image to a file path of your choice.
## The arguments have been optimized for raspbian distribution
## but they can be modified for other distros as well.
## Integrate it as cronjob or run it manually everyday.
function _check_requirements() {
@GrgoMariani
GrgoMariani / Serial_AT_reader.py
Created February 25, 2022 16:17
A script to help with testing the AT commands via serial interface
import threading
import time
import os
import sys
"""
Usage:
Run this script and choose device port. (e.g. 'python3 this_script.py /dev/serial0')
To execute only one command run "C AT" where AT is the command you want to execute
To execute a file with commands run "F Commands.txt 3" where 3 is delay 3 seconds between commands
@GrgoMariani
GrgoMariani / colors.sh
Created August 10, 2021 20:39
Colorful terminal printing
#!/bin/bash
C_BLACK='\033[0;30m'
C_RED='\033[0;31m'
C_GREEN='\033[0;32m'
C_BROWN='\033[0;33m'
C_BLUE='\033[0;34m'
C_PURPLE='\033[0;35m'
C_CYAN='\033[0;36m'
C_LIGHT_GRAY='\033[0;37m'
@GrgoMariani
GrgoMariani / pithon.py
Last active August 9, 2021 18:43
A completely pythonic estimation of pi
from random import random
pi, i = 0, 1
while True:
pi, i = pi * (i - 1) / i + (4 / i if random() ** 2 + random() ** 2 < 1 else 0), i + 1
print(end=f"\r{pi}")