Skip to content

Instantly share code, notes, and snippets.

@golimpio
golimpio / egos_throttle.sh
Last active August 23, 2023 06:54
Run cputhrottle for a list of applications in order to limit their CPU usage.
#!/bin/bash
# Run cputhrottle for a list of applications in order to limit their CPU usage.
# This script needs `pidof` and `cputhrottle` installed, which can be installed from homebrew.
# NOTE: This script was tested on MacOS only.
if [[ $EUID > 0 ]]; then
echo "Please run this script as root/sudo"
exit 1
fi
@golimpio
golimpio / create_desktop_app_google_chrome.sh
Last active February 12, 2024 20:27
A shell script to create application shortcuts in Google Chrome on a Mac
#!/bin/sh
#----------------------------------------------------------------------------------------------------------
#
# Original author: Bracken King
# https://www.lessannoyingcrm.com/blog/2010/08/149/create+application+shortcuts+in+google+chrome+on+a+mac
#
# Modified by: Gilberto R. Olimpio
#
# Changes:
@demonbane
demonbane / makeapp.sh
Created July 5, 2011 20:05
Create a Fluid-style app launcher for single-window Chrome instances on OSX
#!/bin/sh
echo "What should the Application be called (no spaces allowed e.g. GCal)?"
read inputline
name="$inputline"
echo "What is the url (e.g. https://www.google.com/calendar/render)?"
read inputline
url="$inputline"