Skip to content

Instantly share code, notes, and snippets.

@rauchg
rauchg / README.md
Last active Jan 5, 2023
require-from-twitter
View README.md
@soheilhy
soheilhy / nginxproxy.md
Last active Jan 19, 2023
How to proxy web apps using nginx?
View nginxproxy.md

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 example1.com, example2.com, and example1.com/images on the same machine using a single IP address.

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

@netpoetica
netpoetica / Setting up Nginx on Your Local System.md
Last active Oct 12, 2022
Setting up Nginx on Your Local System
View Setting up Nginx on Your Local System.md

#Setting up Nginx on Your Local System ###by Keith Rosenberg

##Step 1 - Homebrew The first thing to do, if you're on a Mac, is to install homebrew from http://mxcl.github.io/homebrew/

The command to type into terminal to install homebrew is:

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
@febuiles
febuiles / songs.md
Last active Jul 1, 2022
Fetching lyrics in Unix
View songs.md

Fetching lyrics in the command line

Objective: Print the lyrics for the current playing song.

How: We'll create a small bash script to do the fetching for us (using curl) and then we'll display it either in the terminal or in our $EDITOR

Get the current song

First we'll need to get the name of the current song and its artist: