Skip to content

Instantly share code, notes, and snippets.

View chrowe's full-sized avatar

Chris Rowe chrowe

View GitHub Profile
@chrowe
chrowe / README.md
Last active March 25, 2016 04:28
Scripts to set up a site on our dev server

Use the site.sh script to create create a directory, download a git repo, create a log directory, set up settings.local.php, create a database, chreate a vhost file, and import a db backup

The other scripts are called by site.sh

Usage: site.sh [subdomain] [git url] [New MySQL password for site] [Database backup path] [http/https]

Script asks for the MySQL Root password

@chrowe
chrowe / gist:5623634
Created May 21, 2013 22:01
settings.local.php template
<?php
$databases = array (
'default' =>
array (
'default' =>
array (
'database' => '',
'username' => '',
'password' => '',
@chrowe
chrowe / drush dq.txt
Last active December 16, 2015 23:59
My drush qd template
drush qd mahr-content-import admin_menu module_filter devel fpa views views_bulk_operations ctools features strongarm diff date entity entityreference feeds feeds_tamper job_scheduler extlink --yes
drush en module_filter fpa views_ui devel_generate admin_menu_toolbar extlink feeds_tamper feeds_ui features strongarm date diff --yes
drush dis toolbar overlay --yes
127.0.0.1 localhost
66.25.167.202 octopus.chr.dyndns.org aegir.octopus.chr.dyndns.org
# The following lines are desirable for IPv6 capable hosts
::1 localhost ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
==> EXIT on error due to invalid DNS setup.
* Your custom _MY_OWNIP is set to "66.25.167.202"
* Your custom _MY_HOSTN is set to "octopus.chr.dyndns.org"
* Your custom _MY_FRONT is set to "aegir.octopus.chr.dyndns.org"
* Your _MY_HOSTN and/or _MY_FRONT doesn't match your _MY_OWNIP,
or your hostname is not set properly yet.
* Please add/check correct line in your /etc/hosts file on the server:
==> INSTALL START -> checkpoint:
* Your e-mail address appears to be my@email.com - is that correct?
* Your IP address appears to be - are you sure it's a valid IP?
* Your hostname appears to be - are you sure it's a valid FQDN hostname?
NOTE: If your outgoing SMTP requires using relayhost, define first _SMTP_RELAY_HOST.
* Your core Aegir instance control panel will be available at http://.
* Your (optional) MultiCore Apache Solr Tomcat will listen on localhost:8080.
@chrowe
chrowe / autorun.sh
Last active August 29, 2015 14:26
OPK water temps
#!/bin/bash
cd /root
watch -n600 "./opk-temper1-cli/pull --scale farenheit | ./opk-wrap/wrap -s JSON -k temp | ./opk-phant-json/push ; ./opk-1-wire-cli/pull --path 041471d2a2ff --scale fahrenheit | ./opk-cli--phant/push --public_key VGAXp1b2bgtmVJK9JqMJ --private_key 9YAg2kBaBZTk8oa4ovwo --url data.sparkfun.com --field_name temp"
@chrowe
chrowe / autorun.sh
Last active August 29, 2015 14:26 — forked from treehouse-su/autorun.sh
temper1 OPK script
#!/bin/sh
# configure pirateship image
sudo pirateship rename temper
sudo pirateship adapter pirate.sh/ip "" none
# install opk drivers
# NOTE: must manually copy phant 'keys_*.json' file to /boot directory
cd /root
mkdir drivers
git clone https://github.com/openpipekit/opk-temper1-cli.git
git clone https://github.com/openpipekit/opk-phant-cli.git
./drivers/opk-temper1-cli/install
sudo ./drivers/opk-temper1-cli/detect
sudo ./drivers/opk-temper1-cli/pull --path 0001:0005:01 --scale farenheit