Skip to content

Instantly share code, notes, and snippets.

@GiorgioAresu
GiorgioAresu / adp-download.user.js
Last active October 31, 2022 09:55
Download files from ADP.com as separate files
// ==UserScript==
// @name ADP download
// @namespace https://github.com/GiorgioAresu
// @version 1.0.1
// @description Download files from ADP as separate files
// @author You
// @match https://www.multidocs.it.adp.com/idp/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=adp.com
// @grant none
// ==/UserScript==
@GiorgioAresu
GiorgioAresu / connect-pi0-otg
Created July 1, 2019 23:10
Connect to Raspberry Pi 0 OTG Ubuntu
#!/bin/sh
NET=`ip addr show | grep UNKNOWN | grep -v lo: | awk -F ': ' '{print $2}'`
OWN_IP=`echo $1 | awk -F '[ \t]+|/' '{print $4}'`
PI_IP=`ping6 -I $NET ff02::1 | grep DUP\! -m1 | awk -F '\ |: ' '{print $4}'`
ssh -6 pi@${PI_IP}
@GiorgioAresu
GiorgioAresu / add_resolution.sh
Created May 6, 2018 20:03
Script to add a custom resolution when it doesn't get detected automatically (ie. ultrawide)
#!/bin/bash
if [ $# -lt 5 ]
then
echo "Usage: $0 (add|del) display hres vres refresh"
exit 1
fi
mode=$1
display=$2
hres=$3
@GiorgioAresu
GiorgioAresu / photon-update.sh
Last active February 21, 2017 19:07
Update script for photon VM
tdnf makecache
tdnf check-update
tdnf update
echo You should probably systemctl restart services as needed
@GiorgioAresu
GiorgioAresu / cm_nightlies_downloader.sh
Created February 4, 2016 00:40
Bash script to automatically download CM nightlies roms and accumulate them into a user-specified folder.
#!/bin/bash
Device=$1
Path=$2
if [ $# -ne 2 ] || [ $# == "--help" ] || [ $# == "-h" ]
then
echo Simple CM Nightlies downloader
echo
echo Usage: $(basename $0) device-name output-path
@GiorgioAresu
GiorgioAresu / weather.items
Last active August 29, 2015 14:19
OpenHAB Yahoo Weather Sunrise and Sunset 24h format
String Weather_Sunrise_Raw "[%s]" { http="<[http://weather.yahooapis.com/forecastrss?w=711080&u=c:60000:XSLT(yahoo_weather_sunrise.xsl)]" }
String Weather_Sunrise "Sunrise [%s]" <sun> (Weather)
String Weather_Sunset_Raw "[%s]" { http="<[http://weather.yahooapis.com/forecastrss?w=711080&u=c:60000:XSLT(yahoo_weather_sunset.xsl)]" }
String Weather_Sunset "Sunset [%s]" <sun> (Weather)
@GiorgioAresu
GiorgioAresu / Conky Ubuntu
Created March 5, 2015 09:21
Conky configuration for Ubuntu linux
# Size and position
alignment top_right
gap_x 5
gap_y 30
minimum_size 300 1050
maximum_width 300
# Appearance and font
border_margin 4
border_width 2
@GiorgioAresu
GiorgioAresu / Conky Arch
Created March 5, 2015 09:20
Conky configuration for arch linux
# Size and position
alignment top_right
gap_x 5
gap_y 30
minimum_size 250 738
maximum_width 250
# Appearance and font
border_margin 4
border_width 2
@GiorgioAresu
GiorgioAresu / table border and radius.sass
Last active August 29, 2015 14:07
Include this SASS snippet to apply a border and a radius to a table. I created this because I was unable to create a nice 1px border with corner radius. You can pass a border style and a radius value to the mixin
=table-border-and-radius($border, $radius)
table
border-collapse: separate
th, td
border-top: $border
border-left: $border
th:first-child
border-top-left-radius: $radius