This file contains hidden or 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/env bash | |
function log { | |
echo "[`date +'%Y-%m-%d %H:%M:%S.%N'`] $1" | |
} | |
MYSQL_BACKUP_USER=$(grep DB_USERNAME ./../.env | awk -F= '{ print $2 }') | |
MYSQL_BACKUP_PASS=$(grep DB_PASSWORD ./../.env | awk -F= '{ print $2 }') | |
BACKUP_DIR=/var/mysql-backup/storage | |
EXCLUDED_DATABASES=(Database information_schema mysql performance_schema sys) |
This file contains hidden or 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
#Installing Neo4j on Ubuntu | |
#Add the Neo4j key to apt | |
wget -O - http://debian.neo4j.org/neotechnology.gpg.key | apt-key add - | |
#Add the Neo4j repositories to apt | |
echo 'deb http://debian.neo4j.org/repo stable/' > /etc/apt/sources.list.d/neo4j.list | |
apt-get update -y |
This file contains hidden or 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
##vars.yml | |
#DigitalOcean stuff | |
digital_ocean_token: DIGITAL_OCEAN_TOKEN_HERE | |
digital_ocean_ssh_name: ocelot.pub | |
digital_ocean_ssh_pub: "{{ lookup('file', '/vagrant/ansible/ssh/ocelot.pub') }}" | |
digital_ocean_ssh_key: /vagrant/ansible/ssh/ocelot | |
digital_ocean_droplet_name: ocelotdroplet | |
digital_ocean_droplet_size_id: 512mb | |
digital_ocean_droplet_region_id: lon1 |
This file contains hidden or 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
//Add some contstraints for good measture, constraints must be ran individually | |
CREATE CONSTRAINT ON (c:Customer) ASSERT c.email IS UNIQUE; | |
CREATE CONSTRAINT ON (p:Product) ASSERT p.uuid IS UNIQUE; | |
//:Start Product and customer query: | |
//Products, bundles and categories | |
CREATE (product1:Product {name: "Product 1", uuid: "d8d177cc-1542-11e5-b60b-1697f925ec7b", price: 10}) | |
CREATE (product2:Product {name: "Product 2", uuid: "d8d17b28-1542-11e5-b60b-1697f925ec7b", price: 20}) | |
CREATE (product3:Product {name: "Product 3", uuid: "d8d17c72-1542-11e5-b60b-1697f925ec7b", price: 30}) |
This file contains hidden or 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
<?php | |
/* | |
* Load the the Main menu | |
*/ | |
$main_menu = module_invoke('system', 'block_view', 'main-menu'); | |
echo render($main_menu['content']); | |
?> |
This file contains hidden or 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
PATH=$PATH:/usr/local/bin | |
export PATH | |
function parse_git_branch { | |
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ \[\1\]/' | |
} |