Skip to content

Instantly share code, notes, and snippets.

emile emileswain

  • London
Block or report user

Report or block emileswain

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
soheilhy /
Last active Dec 16, 2019
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

gruber / Liberal Regex Pattern for Web URLs
Last active Dec 5, 2019
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.