This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
blueprint: | |
name: Set Indicator Light on Scene Controller | |
description: For Zooz ZEN32. Sets the indicator color when light is off or dimmed. | |
domain: automation | |
input: | |
zooz_switch: | |
name: Zooz Switch | |
description: List of available Zooz ZEN32 switches. | |
selector: | |
device: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
blueprint: | |
name: Control Light with Scene Controller | |
description: For Zooz ZEN32. Toggle a light with a single press, set it to max brightness with double-tap, night-light mode with hold. | |
domain: automation | |
input: | |
zooz_switch: | |
name: Zooz Switch | |
description: List of available Zooz ZEN32 switches. | |
selector: | |
device: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/awk -f | |
function MonInNum(in_str) { | |
return (index("JanFebMarAprMayJunJulAugSepOctNovDec",in_str)+2)/3 | |
} | |
function TimeMaker(year, mon, day, hour, min, sec, utc) { | |
datestring = year" "mon" "day" "hour" "min" "sec" "utc | |
return mktime(datestring) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Credit goes to the contributors of this post: | |
# https://devtalk.nvidia.com/default/topic/983777/can-t-locate-installutils-pm-in-inc/ | |
# Assuming using run file: cuda_8.0.61_375.26_linux.run | |
./cuda_8.0.61_375.26_linux.run --tar mxvf | |
sudo cp InstallUtils.pm /usr/lib/x86_64-linux-gnu/perl-base | |
sudo ./cuda_8.0.61_375.26_linux.run --override |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
This script is based on the instruction provided by IDRE UCLA | |
https://stats.idre.ucla.edu/stata/seminars/repeated-measures-analysis-with-stata/ | |
*/ | |
/**** Data ****/ | |
use https://stats.idre.ucla.edu/stat/data/repeated_measures, clear | |
/* | |
There are a total of |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import boto.mturk.connection | |
sandbox_host = 'mechanicalturk.sandbox.amazonaws.com' | |
real_host = 'mechanicalturk.amazonaws.com' | |
mturk = boto.mturk.connection.MTurkConnection( | |
aws_access_key_id = 'XXX', | |
aws_secret_access_key = 'XXX', | |
host = sandbox_host, | |
debug = 1 # debug = 2 prints out all requests. but we'll just keep it at 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Commands for setting up Samba 4 Domain Controller on Raspberry Pi 3. | |
# Only tested on "2017-08-16-raspbian-stretch-lite". | |
# Credit goes to: | |
# VirtualFrontiers.co.uk http://www.virtualfrontiers.co.uk/domain_controller.htm | |
# Techmint.com https://www.tecmint.com/set-add-static-ip-address-in-linux/ | |
# Note that I have applied this fix for ethernet interface naming. | |
# https://raspberrypi.stackexchange.com/questions/43560/raspberry-pi-3-eth0-wrongfully-named-enx |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Credit goes to saiarcot895: | |
# https://launchpad.net/~saiarcot895/+archive/ubuntu/chromium-dev | |
# Assuming API key has been generated, | |
# http://www.chromium.org/developers/how-tos/api-keys | |
# and (of course), chromium-browser has installed... | |
sudo mv $(which chromium-browser) $(which chromium-browser).backup | |
git clone https://github.com/scheib/chromium-latest-linux.git | |
sudo ln -s $(pwd)/chromium-latest-linux/latest/chrome $(which chromium-browser) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# http://tqdev.com/2016-installing-adminer-ubuntu | |
# http://askubuntu.com/questions/760787/php-rendered-as-text-after-ubuntu-16-04-upgrade | |
sudo apt install apache2 libapache2-mod-php | |
sudo a2enmod php7.0 | |
sudo a2dismod mpm_event | |
sudo a2enmod mpm_prefork | |
sudo mkdir /usr/share/adminer | |
sudo wget "http://www.adminer.org/latest.php" -O /usr/share/adminer/latest.php | |
sudo ln -s /usr/share/adminer/latest.php /usr/share/adminer/adminer.php |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# install current version | |
echo 'deb http://www.rabbitmq.com/debian/ testing main' | sudo tee /etc/apt/sources.list.d/rabbitmq.list | |
wget -O- https://www.rabbitmq.com/rabbitmq-release-signing-key.asc | sudo apt-key add - | |
sudo apt-get update | |
sudo apt-get install rabbitmq-server | |
# enable web interface | |
rabbitmq-plugins enable rabbitmq_management | |
# create admin account, guest/guest doesn't seem to work |
NewerOlder