Skip to content

Instantly share code, notes, and snippets.

View hto's full-sized avatar
👀
./hto

Halil Tuğcan Özaktaş hto

👀
./hto
View GitHub Profile
@hto
hto / handler.js
Created December 31, 2017 10:57 — forked from jeffrafter/handler.js
Simple HTTP Server and Router in node.js
exports.createHandler = function (method) {
return new Handler(method);
}
Handler = function(method) {
this.process = function(req, res) {
params = null;
return method.apply(this, [req, res, params]);
}
}
@hto
hto / nginxproxy.md
Created December 30, 2017 17:04 — forked from soheilhy/nginxproxy.md
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 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

@hto
hto / lets.go
Created July 19, 2017 12:07 — forked from cptangry/lets.go
Tek dosyada Go dilinin temel konuları ve örnekler
package main //Çalıştrılacak her Go kaynak dosyasında yer almalıdır.
// Go Dilinde tek satırlık yorum/açıklama
import (
"fmt" // Standart kütüphaneyi projemize dahil ettik
"io/ioutil" // Temel io işlemleri
"log" // log
"math" // Matematiksel işlem ve değer tanımlarını içeren kütüphaneyi içe aktardık
"net/http"
"os" // İşletim sistemi işlemleri