Skip to content

Instantly share code, notes, and snippets.

View The-Running-Dev's full-sized avatar

Ben Richards The-Running-Dev

View GitHub Profile
@The-Running-Dev
The-Running-Dev / brew-update-notifier.sh
Created July 2, 2019 13:19 — forked from streeter/brew-update-notifier.sh
Homebrew Package Update Notifications on Mountain Lion
#!/bin/bash
#
# Notify of Homebrew updates via Notification Center on Mac OS X
#
# Author: Chris Streeter http://www.chrisstreeter.com
# Requires: terminal-notifier. Install with:
# gem install terminal-notifier
TERM_APP='/Applications/Terminal.app'
BREW_EXEC='/usr/local/bin/brew'
@The-Running-Dev
The-Running-Dev / brew-update-notifier.sh
Created June 14, 2019 12:46 — forked from SimonSimCity/brew-update-notifier.sh
Extended the script, written by @streeter to exclude the pinned formulae in the list of formulas to update.
#!/bin/bash
#
# Notify of Homebrew updates via Notification Center on Mac OS X
#
# Author: Chris Streeter http://www.chrisstreeter.com
# Requires: terminal-notifier. Install with:
# brew install terminal-notifier
TERM_APP='/Applications/Terminal.app'
BREW_EXEC='/usr/local/bin/brew'
@The-Running-Dev
The-Running-Dev / encode.sh
Created April 1, 2019 15:18 — forked from lisamelton/encode.sh
This is the shell script I use to drive HandBrakeCLI to re-encode video files in a format suitable for playback on Apple TV, Roku 3, iOS, OS X, etc.
#!/bin/bash
# encode.sh
#
# Copyright (c) 2013 Don Melton
#
# This version published on June 7, 2013.
#
# Re-encode video files in a format suitable for playback on Apple TV, Roku 3,
# iOS, OS X, etc.
#requires -version 3
[CmdletBinding()]
param (
[string]
$Path
)
function Get-MD5 {
param (
[Parameter(Mandatory)]
@The-Running-Dev
The-Running-Dev / Rename-Files.ps1
Created March 1, 2019 19:38
Powershell Rename Files
function Rename-Files {
[CmdletBinding()]
param(
[Parameter(Position = 0, Mandatory = $true)][String] $path,
[Parameter(Position = 1)][String[]] $include = @('*.mp4', '*.flv'),
[Parameter(Position = 2)][string] $configFile
)
Clear-Host
@The-Running-Dev
The-Running-Dev / ubuntu-ohmyzsh-install.sh
Last active October 23, 2019 11:25
Installs Oh My ZSH on Ubuntu
main() {
sudo apt-get install zsh -y
# Use colors, but only if connected to a terminal, and that terminal
# supports them.
if which tput >/dev/null 2>&1; then
ncolors=$(tput colors)
fi
if [ -t 1 ] && [ -n "$ncolors" ] && [ "$ncolors" -ge 8 ]; then
RED="$(tput setaf 1)"
@The-Running-Dev
The-Running-Dev / .zshrc
Last active October 23, 2019 11:25
Configuration File for Oh My ZSH
export PATH=$HOME/bin:/usr/local/bin:$PATH
export ZSH=$HOME/.oh-my-zsh
export SSH_KEY_PATH=~/.ssh/rsa_id
export UPDATE_ZSH_DAYS=1
export DOTNET_CLI_TELEMETRY_OPTOUT=1
SH_THEME='random'
HYPHEN_INSENSITIVE=true
ENABLE_CORRECTION=false
@The-Running-Dev
The-Running-Dev / ubuntu-setup.sh
Last active October 23, 2019 11:24
Setup for Ubuntu Shell
# Install the latest Docker and Docker Compose
wget -O - https://gist.githubusercontent.com/wdullaer/f1af16bd7e970389bad3/raw/install.sh | bash
# Set the Docker host to the Windows instance
echo "export DOCKER_HOST='tcp://0.0.0.0:2375'" >> ~/.bashrc; source ~/.bashrc
# Install needed packages
sudo apt-get install \
apt-transport-https \
ca-certificates \
@The-Running-Dev
The-Running-Dev / toggleHotCorners.scpt
Created July 24, 2018 07:11 — forked from hng/toggleHotCorners.scpt
Toggles Hot Corners on Mavericks OS X 10.9
-- based on: https://discussions.apple.com/message/23989931#23989931
property theSavedValues : {"Dashboard", "Launchpad", "Mission Control", "Schreibtisch"} -- change "Schreibtisch" to "Desktop" if not german etc.
tell application "System Preferences"
activate
set current pane to pane id "com.apple.preference.expose"
tell application "System Events"
tell window "Mission Control" of process "System Preferences"
click button "Aktive Ecken …" -- on english computer: "Hot Corners…"
tell sheet 1
@The-Running-Dev
The-Running-Dev / Mac OS X Disable Hot Corners
Created June 22, 2018 17:51 — forked from klynch/Mac OS X Disable Hot Corners
Disable those pesky hot corners when you don't want them and easily reenable them when you do!
-- By Richard Kulesus, 2009. Released without license!
-- Use this for whatever!
-- I seriously despise code authors who copyright tiny bits of obvious code
-- like it's some great treasure. This is small and simple, and if it saves
-- the next guy some time and trouble coding applescript I'll feel good!
--
-- Quickly change all the hot-corners to do what you want.
-- Particularly useful for presentations and full-screen games.
-- Customize the activity of each hot-corner with "all windows/application windows/dashboard/disable screen saver/none/show desktop/show spaces/sleep display/start screen saver"
-- The MODIFIERS are the keys which can be used to supplement hot-corner activation.