Skip to content

Instantly share code, notes, and snippets.

@giu1io
giu1io / cleanup_google_chat_ui.js
Last active October 20, 2023 08:06
Tampermonkey Script to Cleanup the Google Chat UI so it can run in a smaller PWA window
// ==UserScript==
// @name Google Chat Style Cleanup
// @namespace http://tampermonkey.net/
// @version 0.13
// @description Tampermonkey Script to Cleanup the Google Chat UI so it can run in a smaller PWA window
// @author Giulio Montagner
// @match https://mail.google.com/chat/*
// @match https://chat.google.com/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=google.com
// @updateURL https://gist.githubusercontent.com/giu1io/03a3ded6658baf697dd1ded7ee4c50fd/raw/cleanup_google_chat_ui.js
let shellyId = 'shellyplus1-xxxxxxxx';
let messageId = 0;
let ackId = null;
function messageIdGetter() {
if(messageId > 99) {
messageId = 0
}
messageId++
@giu1io
giu1io / shelly_gen2_mqtt.yaml
Created October 1, 2022 19:37 — forked from arfoll/shelly_gen2_mqtt.yaml
shelly gen 2 mqtt
## configuration.yaml
automation: !include automation.yaml
switch: !include switches.yaml
binary_sensor: !include binary_sensors.yaml
sensor: !include sensors.yaml
## automation.yaml
- id: shellies_get_status
alias: Shellies Get Status
description: ''

Keybase proof

I hereby claim:

  • I am giu1io on github.
  • I am giu1io (https://keybase.io/giu1io) on keybase.
  • I have a public key whose fingerprint is 8773 D67C F8D9 AEC7 7655 3B52 C376 7E98 D6FD 44B6

To claim this, I am signing this object:

@giu1io
giu1io / cleanNotifications.sh
Last active August 29, 2015 14:21
Shell script that removes all notifications from Notification Center on OSX
#!/bin/bash
# Thanks @LucaTNT for making the script work on < 10.10
MAJOR_OSX_VERSION=$(sw_vers -productVersion | awk -F '.' '{print $2}')
if [[ $MAJOR_OSX_VERSION -ge 10 ]]
then
DB_PATH=`getconf DARWIN_USER_DIR`com.apple.notificationcenter/db/db
else
DB_PATH="$HOME/Library/Application Support/NotificationCenter/"
DB_PATH=$DB_PATH`ls "$DB_PATH"`
@giu1io
giu1io / load_wifi.sh
Last active February 24, 2024 10:00
Shell script that loads the WPA_supplicant configuration and use it to connect to available networks, if none is available it an AP is created. Include Wi-Fi watchdog service that checks that the connection is always working.
#!/bin/bash
WPA_SUPPLICANT_CONF="/etc/wpa_supplicant/wpa_supplicant.conf"
# this funcion is called once the connection is established,
# in this case a boot sound will be played to notify the user that everything is ready.
function connected {
aplay /root/Windows3.1.wav 2>&1 >/dev/null &
}