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 | |
# This is a hack to make Bluetooth headests like the jabra Evolve 65 actually | |
# work as a headset with the Linux (Ubuntu/Debian) Zoom client without having | |
# to switch manually from A2DP to the HSP/HFP profile. | |
# | |
# This is done by injecting an environment variable which makes PulseAudio | |
# recognize the application as a telephony/voice application as described | |
# here: | |
# * https://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/User/Bluetooth/#profiles | |
# * https://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/Developer/Clients/ApplicationProperties/#pa_prop_media_role |
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
// ==UserScript== | |
// @name YouTube Jump to Channel Videos | |
// @namespace http://tampermonkey.net/ | |
// @version 0.6 | |
// @description Redirect links in the subscription list to videos tab instead of the home tab (only works for open in new tab/window) | |
// @author Nathaniel Wu | |
// @include *www.youtube.com/* | |
// @license Apache-2.0 | |
// @supportURL https://gist.github.com/Nathaniel-Wu/b9cbdc29b2b33c7d49993ef70d7993d7 | |
// @grant none |
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 | |
free=$(free -mt | grep Mem | awk '{print $4}') | |
if [[ "$free" -le 100 ]]; then | |
ntfy -b pushover -o user_key YOURKEY send 'memory is less than 100MB' | |
fi | |
exit 0 |
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
EMAILRECIPIANT = "myemail@gmail.com"; | |
function agendaEmail() { | |
let dateOptions = { weekday: 'long', month: 'long', day: 'numeric'}; | |
let timeOptions = { hour12:true, hour:'numeric', minute:'numeric'}; | |
var StartDate = new Date(); |
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 | |
# Script to perform some useful linux cleanup operations | |
# 1. Download the file | |
# 2. Make it executable using chmod +x ubuntu-cleanup-utility.sh | |
# 3. Run command below command | |
# sudo ./ubuntu-cleanup-utility.sh | |
REMOVE_LOG_OLDER_THEN_DAYS=1 | |
SNAP_DIR=/var/lib/snapd/snaps |
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 | |
# | |
# RELEASED UNDER MIT LICENCE : https://mit-license.org | |
# Copyright Allrights Reserved 2020, Henri Shustak | |
# This Script Works With the PushOver <http://pushover.net> service and is capable of sending notifcations to your phone. | |
# | |
# Usage: ./pushover.bash message title url url_title priority device' | |
# | |
# Example: ./pushover.sh "this is a test" "test title" "http://mylink.com" "my url title" 0 "iPhone"' | |
# Note: All parameters except message are optional' |
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
#!/usr/bin/env sh | |
mpc clear | |
curl -s https://somafm.com/channels.xml | grep -Po '((?<=<title><!\[CDATA\[).+?(?=\])|(?<=id=").+?(?="))' | sed 'N;s/\n/ /' | while read -r p; do | |
curl -s "https://somafm.com/$(echo "$p" | grep -Po '^.+?(?= )')130.pls" | grep -Po '(?<=File\d=).+$' | head -n 1 | xargs mpc add; | |
mpc save "Soma FM - $(echo "$p" | grep -Po '(?<= ).+$')" | |
mpc clear | |
done |
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 | |
# depends on jq to parse json | |
# https://stedolan.github.io/jq/ | |
# | |
# This script will query the last.fm API for | |
# similar artists based on the currently playing track. | |
# It will crop the current playlist, and shuffle the API results. | |
# | |
# You can configure 3 parameters: |
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 | |
apt update -y | |
apt install -y lsb-release sudo vim screen curl htop | |
RELEASE=`lsb_release -sc` | |
# Install no-nag | |
cd /tmp | |
curl -s https://api.github.com/repos/Jamesits/pve-fake-subscription/releases/latest \ | |
| grep "browser_download_url.*deb" \ |
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/sh | |
# | |
# Update alsa config file with new BD_ADDR | |
# Backup original | |
# Create a new config file if one doesn't exist | |
usage() { | |
echo "Usage: $0 xx:xx:xx:xx:xx:xx" | |
} |