This two launchdaemon scripts provide scheduled updates and upgrade for homebrew packages.
It will run in the following way:
- brew updateevery day at 12:10
- brew upgradeevery day at 12:20
| library(MBESS) | |
| library(pwr) | |
| nSims <- 100000 #number of simulated experiments | |
| p <-numeric(nSims) #set up empty container for all simulated p-values | |
| obs_pwr <-numeric(nSims) #set up empty container | |
| t <-numeric(nSims) #set up empty container | |
| d_all<-numeric(nSims) | |
| N<-33 #number of participants | 
| Copyright (C) 2016 Donnie Ray Jones | |
| Permission is hereby granted, free of charge, to any person obtaining a | |
| copy of this software and associated documentation files (the | |
| "Software"), to deal in the Software without restriction, including | |
| without limitation the rights to use, copy, modify, merge, publish, | |
| distribute, sublicense, and/or sell copies of the Software, and to | |
| permit persons to whom the Software is furnished to do so, subject to | |
| the following conditions: | 
| You need to setup your crontab with rvm e.g: | |
| rvm cron setup | |
| With that rvm sets your environment variables in your crontab file | |
| then you have a crontab file having this at the top: | |
| PATH="/usr/local/rvm/gems/ruby-1.9.3-p194/bin:/usr/local/rvm/gems/ruby-1.9.3-p194@global/bin:/usr/local/rvm/rubies/ruby-1.9.3-p194/bin:/usr/local/rvm/bin:/usr/local/rvm/gems/ruby-1.9.3-p194/bin:/usr/local/rvm/gems/ruby-1.9.3-p194@global/bin:/usr/local/rvm/rubies/ruby-1.9.3-p194/bin:/usr/local/rvm/bin:/usr/lib64/qt-3.3/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/usr/local/rvm/gems/ruby-1.9.3-p194@global/" | |
| rvm_env_string='ruby-1.9.3-p194' | 
| curl -O https://wordpress.org/latest.zip | |
| unzip latest.zip | |
| mv wordpress site | |
| rm latest.zip | 
| from matplotlib import use | |
| from pylab import * | |
| from scipy.stats import beta, norm, uniform | |
| from random import random | |
| from numpy import * | |
| import numpy as np | |
| import os | |
| # Input data | 
This should help you get Sendmail installed with basic configuration on Ubuntu.
sudo apt-get install sendmail/etc/hosts file: nano /etc/hosts127.0.0.1    localhost yourhostnamesudo sendmailconfigsudo service apache2 restart| #!/usr/bin/ruby | |
| # Create display override file to force Mac OS X to use RGB mode for Display | |
| # see http://embdev.net/topic/284710 | |
| require 'base64' | |
| data=`ioreg -l -d0 -w 0 -r -c AppleDisplay` | |
| edids=data.scan(/IODisplayEDID.*?<([a-z0-9]+)>/i).flatten | |
| vendorids=data.scan(/DisplayVendorID.*?([0-9]+)/i).flatten | 
| ls *.jpg|while read i;do convert $i -strip -interlace Plane -resize "500x" -unsharp 2x0.5+0.5+0 -quality 90 `basename $i .jpg`_small.jpg; convert $i -strip -interlace Plane -resize "1000x" -unsharp 2x0.5+0.5+0 -quality 90 `basename $i .jpg`_large.jpg; done | 
| require "openssl" | |
| require "digest" | |
| def aes128_encrypt(key, data) | |
| key = Digest::MD5.digest(key) if(key.kind_of?(String) && 16 != key.bytesize) | |
| aes = OpenSSL::Cipher.new('AES-128-CBC') | |
| aes.encrypt | |
| aes.key = key | |
| aes.update(data) + aes.final | |
| end |