Skip to content

Instantly share code, notes, and snippets.

View dgalli1's full-sized avatar

Damian Galli dgalli1

View GitHub Profile
@dgalli1
dgalli1 / .sh
Created November 15, 2023 16:56
Simple update script for docker compose
#!/bin/bash
echo "Now Updating all Docker Containers"
export TZ=UTC # force all timestamps to be in UTC (+00:00 / Z)
printf -v start_date_epoch '%(%s)T'
printf -v start_date_iso8601 '%(%Y-%m-%dT%H:%M:%S+00:00)T' "$start_date_epoch"
# List of all folders that contain a docker compose
declare -a StringArray=("auth-stack" "bitwarden" "languagetool" "media-stack" "monitoring" "" "mosquitto" "portainer" "dnsmasq" "socks5" "nginx-proxy-manager" "filebrowser")
# Iterate the string array using for loop
@dgalli1
dgalli1 / style.css
Created April 26, 2023 09:19
jellyfin big music image
.nowPlayingPage {
position: relative;
}
@media only screen and (min-width: 1080px) {
.nowPlayingPageImageContainer {
width: 57%;
}
.nowPlayingInfoControls {
justify-content: start !important;
#!/bin/bash
echo "Now Updating all Docker Containers"
export TZ=UTC # force all timestamps to be in UTC (+00:00 / Z)
printf -v start_date_epoch '%(%s)T'
printf -v start_date_iso8601 '%(%Y-%m-%dT%H:%M:%S+00:00)T' "$start_date_epoch"
# Declare an array of string with type
declare -a StringArray=("auth-stack" "bitwarden" "filerun" "languagetool" "media-stack" "monitoring" )
@dgalli1
dgalli1 / SystemInformation
Last active December 8, 2021 20:18
debug horizon
Computer Information:
Manufacturer: Micro-Star International Co., Ltd.
Model: X370 KRAIT GAMING (MS-7A33)
Form Factor: Desktop
No Touch Input Detected
Processor Information:
CPU Vendor: AuthenticAMD
CPU Brand: AMD Ryzen 7 1700 Eight-Core Processor
CPU Family: 0x17
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="initial-scale=1,maximum-scale=1,user-scalable=no" />
<script src="https://cdn.maptiler.com/mapbox-gl-js/v1.5.1/mapbox-gl.js"></script>
<link href="https://cdn.maptiler.com/mapbox-gl-js/v1.5.1/mapbox-gl.css" rel="stylesheet" />
<style>
#map
{
position: absolute;
@dgalli1
dgalli1 / authelia-config.yml
Last active May 10, 2024 06:10
Authelia + OpenLDAP + Ldap User Manager
ldap:
## The LDAP implementation, this affects elements like the attribute utilised for resetting a password.
## Acceptable options are as follows:
## - 'activedirectory' - For Microsoft Active Directory.
## - 'custom' - For custom specifications of attributes and filters.
## This currently defaults to 'custom' to maintain existing behaviour.
##
## Depending on the option here certain other values in this section have a default value, notably all of the
## attribute mappings have a default value that this config overrides, you can read more about these default values
## at https://www.authelia.com/docs/configuration/authentication/ldap.html#defaults
@dgalli1
dgalli1 / mars.js
Last active June 15, 2021 19:29
Download all Tiles from Google Maps Mars
function getMapUrl(tile, zoom) {
var bound = Math.pow(2, zoom);
var x = tile.x;
var y = tile.y;
// Don't repeat across y-axis (vertically).
if (y < 0 || y >= bound) {
return null;
}
@dgalli1
dgalli1 / force_resolutiuon.lua
Last active September 26, 2020 17:39
MPV Lua Script X11, force resolution on fullscreen
function on_fullscreen_change(name, value)
--[[
xrandr | grep "HDMI-A-0 connected primary 1920x1080+0+0" && echo "true" || echo "false"
xrandr | grep "HDMI-A-0 connected primary 3840x2160+0+0" && echo "true" || echo "false"
--]]
if value == true then
local xrandr_response = os.capture('/usr/bin/xrandr | grep "HDMI-A-0 connected primary 1920x1080+0+0"')
if xrandr_response == "HDMI-A-0 connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 1600mm x 900mm" then
os.capture('xrandr --output DisplayPort-0 --off --output DisplayPort-1 --off --output DisplayPort-2 --off --output HDMI-A-0 --primary --mode 3840x2160 --pos 0x0 --rotate normal')
end
@dgalli1
dgalli1 / setvd.sh
Created November 5, 2019 10:18
Change Virtual Desktop Size Dynamicly
#!/bin/bash
#set the resolution
resolution=$(xdpyinfo | grep dimensions | awk '{print $2}')
echo $resolution
WINEPREFIX=PATH_TO_WINEPREFIX winetricks vd=$resolution
#run the application after the resolution was set
WINEPREFIX=PATH_TO_WINEPREFIX wine PATH_TO_EXECUTABLE