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
#!/bin/bash | |
echo "Starting backup of appdata" | |
rclone sync /mnt/user/Docker\ Backup backblaze:some-bucket/Docker\ Backup --transfers 1 --bwlimit 75M | |
echo "Starting backup of Shared Documentation" | |
rclone sync /mnt/user/Shared\ Documentation backblaze:some-bucket/Shared\ Documentation --bwlimit 75M | |
echo "Starting backup of Read Media" | |
rclone sync /mnt/user/Read_Media/Music backblaze:some-bucket/Read_Media/Music --bwlimit 75M | |
echo "Starting backup of Pictures" | |
rclone sync /mnt/user/Pictures backblaze:some-bucket/Pictures --bwlimit 75M | |
echo "Starting backup of Workdata" |
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
sudo apt-get install openjdk-7-jre-headless -y | |
cd /home/ubuntu/ | |
mkdir -p dynamodb | |
cd dynamodb | |
wget http://dynamodb-local.s3-website-us-west-2.amazonaws.com/dynamodb_local_latest | |
tar -xvzf dynamodb_local_latest | |
rm dynamodb_local_latest | |
mv dynamodb_local_*/ dynamodb/ |
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
/* Jquery function to create guids. | |
* Guid code from | |
* http://stackoverflow.com/questions/105034/how-to-create-a-guid-uuid-in-javascript | |
*/ | |
(function ( $ ) { | |
$.fn.newguid = function () { | |
this.val('xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) { var r = Math.random() * 16 | 0, v = c == 'x' ? r : r & 0x3 | 0x8; return v.toString(16); })); | |
return this; | |
}; |
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
# Origin pull in nginx | |
upstream origin { | |
server host.domain.tld:80; | |
} | |
server { | |
listen 80; | |
root /var/www; | |
index index.html index.htm; |
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
====================================== | |
Setting up Nginx, uWSGI and Python3 | |
====================================== | |
First off, I'm traditionally a PHP developer, but am looking at moving across to Python. I really struggled to find decent documentation on how to get a server up and running for deploying Python web applications from the point of view of someone coming from PHP. The main problems I came across with documentation were: | |
1) Only showed you how to run the server for a single web application. | |
2) Only showed you how to configure the app, not the server it was running on. | |
My preferred workflow for development is by setting up a new VM in VMware Fusion and then forwarding through all requests to that VM via /etc/hosts. This might not be the optimal way to get things up and running, but it works for me. |