This two launchdaemon scripts provide scheduled updates and upgrade for homebrew packages.
It will run in the following way:
brew update
every day at 12:10brew upgrade
every day at 12:20
## based on https://github.com/lioonline/OS-X-El-Capitan | |
## pkg file link - http://osxapps.itunes.apple.com/apple-assets-us-std-000001/Purple30/v4/cc/62/24/cc62243b-7ed7-74cd-d47e-374bc470ecdf/diu414781394017735583.pkg | |
# !!IMPORTANT!! Run this from folder where you have downloaded or copied diu414781394017735583.pkg file | |
#create a tmp folder | |
mkdir sierraRoot && cd sierraRoot | |
#create a folder structure to match apple server | |
sudo mkdir -p ./apple-assets-us-std-000001/Purple30/v4/cc/62/24/cc62243b-7ed7-74cd-d47e-374bc470ecdf/ |
#! /bin/bash | |
# This script will list all open processes for the given file and give you an option to quit them. | |
declare -a PROCS | |
s=$(fuser -f "$1") | |
PROCS=( $s ) | |
if [ "${#PROCS[@]}" == 0 ] ; then | |
echo "File is not open." | |
else |
ffmpeg -i hello-world_2.mp4 -vcodec libx264 -preset veryfast smaller.mp4 |
#!/bin/bash | |
nodes=$(kubectl get node -o name | grep -o 'k8s-agent-[0-9]*-[0-9]') | |
for node in $nodes; do | |
ssh -t -oStrictHostKeyChecking=no $node "echo 'Working on $node...' && curl -L -sf https://gist.githubusercontent.com/sozercan/e089f34fd148156facea27583c12e2e0/raw/bfe8bff079db695895935354ebef4c17dea25be9/autopart.sh | sudo bash" | |
done |
#!/bin/bash | |
# An set of disks to ignore from partitioning and formatting | |
BLACKLIST="/dev/sda|/dev/sdb" | |
# Base directory to hold the data* files | |
DATA_BASE="/mnt" | |
usage() { | |
echo "Usage: $(basename $0) <new disk>" | |
} |
hdiutil compact -puppetstrings -verbose <path_to.sparsebundle> |
#!/bin/bash | |
# | |
# 2010-11-08 - Garrett Honeycutt - code@garretthoneycutt.com | |
# | |
# Released under GPLv2 | |
# | |
# Purpose: to create an encrypted sparsebundle | |
# | |
# Usage : create_encrypted_sparsebundle.sh <destination prefix> <size in GB> | |
# Example : create_encrypted_sparsebundle.sh ~/work 2 |
#!/bin/bash | |
ip="13.82.51.189" | |
ports=(50000 50003 50004) | |
for port in ${ports[@]}; do | |
ssh -t -oStrictHostKeyChecking=no $ip -p $port "echo 'Working on $port...' && curl -L -sf https://raw.githubusercontent.com/sozercan/acs-mount-managed-disk/master/autopart.sh | sudo bash" | |
done |
#!/bin/bash | |
content=`cat /var/lib/dcos/mesos-slave-common | grep gpu -c` | |
if [ $content -gt 0 ]; then | |
apt-get update | |
apt-get install -y gcc | |
apt-get install -y make | |
apt-get install -qqy linux-headers-`uname -r` |