Skip to content

Instantly share code, notes, and snippets.

pein0119 pein0119

Block or report user

Report or block pein0119

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

;; Automatically generated
 ;; custom-set-variables was added by Custom.
 ;; If you edit it by hand, you could mess it up, so be careful.
 ;; Your init file should contain only one such instance.
 ;; If there is more than one, they won't work right.
 '(anzu-cons-mode-line-p nil)
t9md / go-tour-select.go
Last active Jan 31, 2020
Go's Channel and select {} illustrated
View go-tour-select.go
package main
Channel and select {} illustrated by t9md
sample program to understand goroutine communication via channel.
based on go-tour's example
staltz /
Last active Feb 17, 2020
The introduction to Reactive Programming you've been missing
zyxar / exercise.tour.go
Created Apr 6, 2012
tour.golang exercise solutions
View exercise.tour.go
/* Exercise: Loops and Functions #43 */
package main
import (
func Sqrt(x float64) float64 {
z := float64(2.)
joemccann / nginx + node
Created Oct 25, 2010
Set up nginx as a reverse proxy to node.js.
View nginx + node

The idea is to have nginx installed and node installed. I will extend this gist to include how to install those as well, but at the moment, the following assumes you have nginx 0.7.62 and node 0.2.3 installed on a Linux distro (I used Ubuntu).

In a nutshell,

  1. nginx is used to serve static files (css, js, images, etc.)
  2. node serves all the "dynamic" stuff.

So for example, request comes and your css, js, and images get served thru nginx while everything else (the request for say index.html or "/") gets served through node.

  1. nginx listens on port 80.
You can’t perform that action at this time.