Skip to content

Instantly share code, notes, and snippets.


emile emileswain

View GitHub Profile
soheilhy /
Last active Dec 3, 2020
How to proxy web apps using nginx?

Virtual Hosts on nginx (CSC309)

When hosting our web applications, we often have one public IP address (i.e., an IP address visible to the outside world) using which we want to host multiple web apps. For example, one may wants to host three different web apps respectively for,, and on the same machine using a single IP address.

How can we do that? Well, the good news is Internet browsers

diramazioni /
Created Feb 27, 2014
blender python: texture change from command line
texture image path are relative to the blend file directory. run from command line like this:
texture=img/2012720989_c.jpg blender -b mug.blend --python -F PNG -s 1 -e 1 -j 1 -t 0 -a
import os
image_file = os.getenv('texture')
if not image_file:
gruber / Liberal Regex Pattern for Web URLs
Last active Nov 17, 2020
Liberal, Accurate Regex Pattern for Matching Web URLs
View Liberal Regex Pattern for Web URLs
The regex patterns in this gist are intended only to match web URLs -- http,
https, and naked domains like "". For a pattern that attempts to
match all URLs, regardless of protocol, see:
# Single-line version:
zaius / open_uri.rb
Created Oct 7, 2011
Allow open-uri to follow unsafe redirects (i.e. https to http)
View open_uri.rb
# Allow open-uri to follow unsafe redirects (i.e. https to http).
# Relevant issue:
# Source here:
module OpenURI
class <<self
alias_method :open_uri_original, :open_uri
alias_method :redirectable_cautious?, :redirectable?
You can’t perform that action at this time.