Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
""" | |
Example of setting up CORS with Bottle.py. | |
""" | |
from bottle import Bottle, request, response, run | |
app = Bottle() | |
@app.hook('after_request') | |
def enable_cors(): | |
""" |
git ls-files -z | xargs -0n1 git blame -w | perl -n -e '/^.*\((.*?)\s*[\d]{4}/; print $1,"\n"' | sort -f | uniq -c | sort -n |
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
arch=$(uname -m) | |
if [ "$arch" == "i686" -o "$arch" == "i386" -o "$arch" == "i486" -o "$arch" == "i586" ]; then | |
flag=1 | |
else | |
flag=0 | |
fi | |
echo "Installing OpenCV 2.4.10" | |
mkdir OpenCV | |
cd OpenCV | |
echo "Removing any pre-installed ffmpeg and x264" |
// From http://stackoverflow.com/questions/9847580/how-to-detect-safari-chrome-ie-firefox-and-opera-browser | |
// Opera 8.0+ | |
var isOpera = (!!window.opr && !!opr.addons) || !!window.opera || navigator.userAgent.indexOf(' OPR/') >= 0; | |
// Firefox 1.0+ | |
var isFirefox = typeof InstallTrigger !== 'undefined'; | |
// At least Safari 3+: "[object HTMLElementConstructor]" | |
var isSafari = Object.prototype.toString.call(window.HTMLElement).indexOf('Constructor') > 0; | |
// Internet Explorer 6-11 | |
var isIE = /*@cc_on!@*/false || !!document.documentMode; | |
// Edge 20+ |
FROM debian:stretch | |
ENV DEBIAN_FRONTEND noninteractive | |
RUN apt-get update | |
RUN apt-get install -y apt-utils wget bzip2 | |
WORKDIR /src |
# /etc/nginx/sites-enabled/some.domain | |
# Change the server name {some.domain} | |
# Change the {host.of.notebook} and {port} in the following locations | |
server { | |
listen 80; | |
# Change the server name {some.domain} | |
server_name some.domain; | |
location / { | |
# Change the {host.of.notebook} and {port} | |
proxy_pass http://host.of.notebook:port; |
//----------------------------------*\ | |
// TRIGONOMETRY FUNCTIONS | |
//----------------------------------*/ | |
// # Trigonometry in CSS | |
// | |
// - Through Taylor/Maclaurin polynomial representation: http://people.math.sc.edu/girardi/m142/handouts/10sTaylorPolySeries.pdf | |
// - Useful if you don't want to use JS. | |
// - With CSS Variables. | |
// - `calc()` can't do power (x ^ y) so I used multiplication instead. |