Note: Office only
mso-ansi-font-size: large | larger | <length> | medium | <percentage> | small | smaller | x-large | x-small | xx-large | xx-small
| -- Create a group | |
| CREATE ROLE readaccess; | |
| -- Grant access to existing tables | |
| GRANT USAGE ON SCHEMA public TO readaccess; | |
| GRANT SELECT ON ALL TABLES IN SCHEMA public TO readaccess; | |
| -- Grant access to future tables | |
| ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT SELECT ON TABLES TO readaccess; |
| function uploadFile(file) { | |
| var formData = new FormData(); | |
| formData.append("userfile", file); | |
| var request = new XMLHttpRequest(); | |
| request.onload = function () { | |
| if (request.status == 200) { | |
| document.location.href='/'; | |
| } else { | |
| alert('Error! Upload failed'); | |
| } |
| #!/bin/bash | |
| # ensure running bash | |
| if ! [ -n "$BASH_VERSION" ];then | |
| echo "this is not bash, calling self with bash...."; | |
| SCRIPT=$(readlink -f "$0") | |
| /bin/bash $SCRIPT | |
| exit; | |
| fi | |
| ====================================== | |
| 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. |