- simple and clean!
- fast
- works on default zsh settings
Just add to your ~/.zshrc following lines:
| server { | |
| listen 80; | |
| server_name bitrix.example.com; | |
| client_max_body_size 200m; | |
| root /var/www/bitrix; | |
| index index.html index.php; |
| check_mail:0 | |
| # color-code each line based on it's http status code "family" | |
| colorscheme:nginx | |
| cs_re:green:^.* 20.? .*$ | |
| cs_re:cyan:^.* 30.? .*$ | |
| cs_re:yellow:^.* 40.? .*$ | |
| cs_re:red:^.* 50.? .*$ |
| #!/bin/bash | |
| if [[ -z $1 ]]; then | |
| NEW_DB="127.0.0.1" | |
| else | |
| NEW_DB="$1" | |
| fi | |
| DIR=$(pwd) |
| #!/usr/bin/env python | |
| """Simple HTTP Server With Upload. | |
| simpleUploadServer.py | |
| This module builds on BaseHTTPServer by implementing the standard GET | |
| and HEAD requests in a fairly straightforward manner. | |
| """ |
| # | |
| # Wide-open CORS config for nginx | |
| # | |
| location / { | |
| if ($request_method = 'OPTIONS') { | |
| add_header 'Access-Control-Allow-Origin' '*'; | |
| # |
| location /resize { | |
| alias /tmp/nginx/resize; | |
| set $width 150; | |
| set $height 100; | |
| set $dimens ""; | |
| if ($uri ~* "^/resize_(\d+)x(\d+)/(.*)" ) { | |
| set $width $1; | |
| set $height $2; | |
| set $image_path $3; |
| # Add alias to bash shell | |
| echo "alias json='python -mjson.tool'" >> ~/.bashrc | |
| # Add alias for zsh shell | |
| echo "alias json='python -mjson.tool'" >> ~/.zshrc |
| # /etc/systemd/system/selenium.service | |
| [Unit] | |
| Description=Selenium Standalone Server | |
| Requires=xvfb.service | |
| After=xvfb.service | |
| [Service] | |
| Type=simple |
| #!/bin/bash | |
| set -e | |
| nginx -t | |
| echo " remove all subdirectories of nginx proxy_cache_path" | |
| for dir in $(nginx -T 2>&1 | grep proxy_cache_path | awk $'{print $2}'); do | |
| rm -rf ${dir}/* | |
| done | |
| echo " restart nginx daemon" | |
| service nginx restart |