This two launchdaemon scripts provide scheduled updates and upgrade for homebrew packages.
It will run in the following way:
brew updateevery day at 12:10brew upgradeevery day at 12:20
| #!/usr/bin/env python | |
| """Test functions from | |
| http://stackoverflow.com/questions/28680896/how-can-i-get-the-3rd-friday-of-a-month-in-python | |
| """ | |
| import calendar | |
| from datetime import date, datetime, time, timedelta | |
| from itertools import islice | |
| DAY = timedelta(1) |
| #Insall Ajenti | |
| apt-get update | |
| wget http://repo.ajenti.org/debian/key -O- | apt-key add - | |
| echo "deb http://repo.ajenti.org/ng/debian main main ubuntu" >> /etc/apt/sources.list | |
| apt-get update | |
| apt-get install ajenti | |
| service ajenti restart | |
| # Uninstall Apache2 | |
| sudo apt-get autoremove && sudo apt-get remove apache2* |
| #include <Adafruit_NeoPixel.h> | |
| #define PIN 1 | |
| #define STRIPSIZE 16 | |
| // Parameter 1 = number of pixels in strip | |
| // Parameter 2 = pin number (most are valid) | |
| // Parameter 3 = pixel type flags, add together as needed: | |
| // NEO_KHZ800 800 KHz bitstream (most NeoPixel products w/WS2812 LEDs) | |
| // NEO_KHZ400 400 KHz (classic 'v1' (not v2) FLORA pixels, WS2811 drivers) |
| #/usr/bin/env python | |
| from pandas import np | |
| from pandas.io.data import DataReader | |
| def historical_volatility(sym, days): | |
| "Return the annualized stddev of daily log returns of `sym`." | |
| try: | |
| quotes = DataReader(sym, 'yahoo')['Close'][-days:] |
| #!/bin/bash | |
| # Script for installing tmux on systems where you don't have root access. | |
| # tmux will be installed in $HOME/local/bin. | |
| # It's assumed that wget and a C/C++ compiler are installed. | |
| # exit on error | |
| set -e | |
| TMUX_VERSION=1.8 |