Skip to content

Instantly share code, notes, and snippets.

View pythoninthegrass's full-sized avatar

pythoninthegrass

View GitHub Profile
@pythoninthegrass
pythoninthegrass / config.yaml
Last active May 17, 2024 23:33
Tabby (AKA Terminus) config
terminal:
searchOptions: {}
colorScheme:
name: Tomorrow Night Blue Dark
foreground: '#ffffff'
background: '#212c41'
cursor: '#ffffff'
colors:
- '#000000'
- '#ff9da4'
@pythoninthegrass
pythoninthegrass / remove_completed_torrents.sh
Last active June 21, 2021 06:53 — forked from root-hal9000/removecompletedtorrents.sh
Transmission-Daemon: Remove Completed Torrents
#!/usr/bin/env bash
# SOURCE: https://gist.github.com/ffcruz85/6c9fb792fce4af0c4cb561fd653c86b6
# Script to check for complete torrents in transmission folder, then stop and move them
# either hard-code the MOVEDIR variable here…
MOVEDIR='/data/complete'
# TODO: read $env vars or file
@pythoninthegrass
pythoninthegrass / LICENSE
Created June 7, 2021 20:01 — forked from noelbundick/LICENSE
Exclude WSL installations from Windows Defender realtime protection
MIT License
Copyright (c) 2018 Noel Bundick
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
@pythoninthegrass
pythoninthegrass / MegaPKGr.zsh
Last active May 28, 2021 23:59 — forked from talkingmoose/MegaPKGr.zsh
The pkgbuild binary and Jamf Composer don't support adding single files of 8 GB or more to a package. Some apps like Install macOS Big Sur.app include files larger than 8 GB in their bundles. This script will create a deployable PKG file from apps whose bundles include those large files.
#!/bin/zsh
:<<ABOUT_THIS_SCRIPT
-------------------------------------------------------------------------------
Written by: William Smith
Professional Services Engineer
Jamf
bill@talkingmoose.net
https://gist.github.com/e9ed319226c6da30dd633725e48a97b0
#!/usr/bin/env bash
# SOURCES:
# https://www.cyberciti.biz/faq/apple-mac-os-x-update-softwareupdate-bash-shell-command/
# https://www.tecmint.com/use-shell-script-variable-in-awk/
# https://stackoverflow.com/questions/369758/how-to-trim-whitespace-from-a-bash-variable/40962059#40962059
# https://stackoverflow.com/questions/238073/how-to-add-a-progress-bar-to-a-shell-script
# https://beebo.org/haycorn/2015-10-03_applescript-tips.html
# https://developer.apple.com/library/archive/documentation/LanguagesUtilities/Conceptual/MacAutomationScriptingGuide/DisplayProgress.html
# https://pysimplegui.readthedocs.io/en/latest/#progress-meters
@pythoninthegrass
pythoninthegrass / ccdl.command
Last active April 10, 2021 01:27 — forked from ayyybe/ccdl.command
Adobe Offline Package Generator v0.1.2 (macOS only)
#!/bin/bash
CYAN="$(tput bold; tput setaf 6)"
RESET="$(tput sgr0)"
clear
if command -v python3 > /dev/null 2>&1; then
if [ $(python3 -c "print('ye')") = "ye" ]; then
clear
@pythoninthegrass
pythoninthegrass / autorun.sh
Created February 20, 2021 23:08
QNAP /tmp/config/autorun.sh for disabling advanced power management (APM) for noisy HDDs
#!/usr/bin/env bash
# SOURCES:
# https://www.brainbytez.nl/tutorials/qnap-nas-fix-the-seagate-chirp-sound/
# Disable advanced power management (APM) for noisy Seagate drives
# qcli_storage
hdparm -B 255 /dev/sda
hdparm -B 255 /dev/sdb
hdparm -B 255 /dev/sdc
@pythoninthegrass
pythoninthegrass / Proxmox reload services
Created February 15, 2021 21:19 — forked from kevin39/Proxmox reload services
Proxmox reload services properly (services order is important)
service pve-cluster restart && service pvedaemon restart && service pvestatd restart && service pveproxy restart
@pythoninthegrass
pythoninthegrass / lambda_vs_itemgetter.py
Created January 29, 2021 04:25 — forked from nickholt-driver/lambda_vs_itemgetter.py
Benchmark for lambdas versus itemgetter
import random
from operator import itemgetter
import timeit
def random_point():
return (random.randint(0, 100), random.randint(0, 100), random.randint(0, 100))
points = None # Global because of timeit scoping
def test_lambda():
@pythoninthegrass
pythoninthegrass / Change Jamf Pro Activation Code.sh
Created December 2, 2020 22:27 — forked from talkingmoose/Change Jamf Pro Activation Code.sh
Programmatic method to change a Jamf Pro server's Activation Code via the Classic API.
#!/bin/bash
# server connection information
URL="https://jss.talkingmoose.net:8443"
userName="JSSAPI-Editor"
password="password"
# XML data to upload
THExml="<activation_code>
<organization_name>Talking Moose Industries</organization_name>