Skip to content

Instantly share code, notes, and snippets.

View jloveland's full-sized avatar

Jason Loveland jloveland

View GitHub Profile

You can create a root cron job that calls this script to execute at a specific time in the evening and then awake in the morning:

sudo crontab -e

Now enter something like to run the suspend script at 23:30:

30 23 * * * /home/myhomefolder/suspend_until.sh 07:30
#!/bin/bash
# Auto suspend and wake-up script
#
# Puts the computer on standby and automatically wakes it up at specified time
#
# Written by Romke van der Meulen <redge.online@gmail.com>
# Minor mods fossfreedom for AskUbuntu
#
# Takes a 24hour time HH:MM as its argument
# Reference:
https://www.cloudgear.net/blog/2015/5-minutes-kubernetes-setup/
# install homebrew and cask
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
# install virtualbox
brew cask install virtualbox
# install dockertoolbox
docker commit -m "Adding inital laikaboss container" -a "Jason Loveland" <hash> jloveland/laikaboss:latest
docker push jloveland/laikaboss
docker rmi $(docker images -a | grep "^<none>" | awk '{print $3}')
@jloveland
jloveland / brew-re-link.sh
Last active August 29, 2015 14:08
zsh shell missing lib --> brew re-link FORMULAs
@jloveland
jloveland / rename-tag
Created October 5, 2014 02:48
rename a git tag
#!/bin/bash
echo "enter new tag: "
read new
echo "enter old tag: "
read old
echo "new tag: " $new
echo "old tag: " $old