Skip to content

Instantly share code, notes, and snippets.

View alexphelps's full-sized avatar
🤔

Alex Phelps alexphelps

🤔
View GitHub Profile
@clintkev251
clintkev251 / backup
Created July 28, 2022 00:01
Simple backup user script for unraid + rclone
#!/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"
@jamesonjlee
jamesonjlee / gist:11271979
Created April 24, 2014 22:40
dynamodb local setup
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/
@leegould
leegould / jquery.newguid.js
Last active July 15, 2018 06:46
Jquery plugin for creating a new guid.
/* 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;
};
@bolstad
bolstad / gist:5422344
Created April 19, 2013 18:45
# Origin pull in nginx
# Origin pull in nginx
upstream origin {
server host.domain.tld:80;
}
server {
listen 80;
root /var/www;
index index.html index.htm;
@simoncoulton
simoncoulton / nginx-uwsgi-python3
Created May 7, 2012 04:39
Setting up Nginx, uWSGI & Python3
======================================
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.