aboutsummaryrefslogtreecommitdiff
path: root/.local/share
diff options
context:
space:
mode:
Diffstat (limited to '.local/share')
-rwxr-xr-x.local/share/bin/=18
-rwxr-xr-x.local/share/bin/nginx-dev4
2 files changed, 19 insertions, 3 deletions
diff --git a/.local/share/bin/= b/.local/share/bin/=
index 59b9b45..dd8ba6c 100755
--- a/.local/share/bin/=
+++ b/.local/share/bin/=
@@ -1,2 +1,16 @@
-#!/bin/sh
-python3 -c "from math import *; deg = pi / 180; print($*)"
+#!/bin/python3 --
+from sys import argv as _argv
+
+from math import *
+deg = pi / 180
+
+MIN = min
+MAX = max
+BIT = lambda n: 1 << n
+GENMASK = lambda h, l: (BIT(MAX(h, l) + 1) - 1) ^ (BIT(MIN(h, l)) - 1)
+
+try:
+ print(eval(" ".join(_argv[1:])))
+except:
+ exit(1)
+
diff --git a/.local/share/bin/nginx-dev b/.local/share/bin/nginx-dev
index 10987fd..40e73ad 100755
--- a/.local/share/bin/nginx-dev
+++ b/.local/share/bin/nginx-dev
@@ -4,6 +4,8 @@ port=8080
try_files='/$uri /$uri.html /$uri/index.html =404'
access_log='/dev/stdout'
cache_control='
+ proxy_store off;
+ proxy_cache off;
add_header Last-Modified $date_gmt;
add_header Cache-Control "private no-store, no-cache, must-revalidate, proxy-revalidate, max-age=0";
if_modified_since off;
@@ -35,7 +37,7 @@ while getopts hvp:Ct:qx OPT; do
p) port="$OPTARG" ;;
t) try_files="$OPTARG" ;;
v) print_config=1 ;;
- C) cache_control="" ;;
+ C) cache_control='' ;;
q) access_log="/dev/null" ;;
x) open_browser=1 ;;
\?|*) usage 1 ;;