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
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | |
fastcgi_param QUERY_STRING $query_string; | |
fastcgi_param REQUEST_METHOD $request_method; | |
fastcgi_param CONTENT_TYPE $content_type; | |
fastcgi_param CONTENT_LENGTH $content_length; | |
fastcgi_param SCRIPT_NAME $fastcgi_script_name; | |
fastcgi_param REQUEST_URI $request_uri; | |
fastcgi_param DOCUMENT_URI $document_uri; | |
fastcgi_param DOCUMENT_ROOT $document_root; |
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
import random as r | |
import math as m | |
# Number of darts that land inside. | |
inside = 0 | |
# Total number of darts to throw. | |
total = 1000 | |
# Iterate for the number of darts. | |
for i in range(0, total): |
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
# if not running interactively, don't do anything | |
[ -z "$PS1" ] && return | |
# Detect platform | |
platform='unknown' | |
unamestr=`uname` | |
if [[ "$unamestr" == 'Linux' ]]; then | |
platform='linux' | |
elif [[ "$unamestr" == 'FreeBSD' ]]; then | |
platform='freebsd' |
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
# [0-9].example.com -> /srv/tickets.example.com/[0-9]/app/build | |
# http://nginx.org/en/docs/http/server_names.html | |
server { | |
listen 80; | |
server_name "~^(?<subdomain>^\d).example.com$"; | |
root /srv/tickets.example.com/$subdomain/app/build; | |
} |