VMWare fusion: connecting to host’s web server from guest

Using Fusion 6.0.2 on OS X 10.9 Mavericks In the host system (Mac) turn off your virtual machine open the “Virtual Machine | Network Adapter | Network Adapter Settings…” menu in the “Bridget Networking” section choose “Autodetect”: turn on your virtual machine In the guest system (Win7) right click on the Notepad application, then select … Read more

Serving gzipped content for Go

The New York Times have released their gzip middleware package for Go. You just pass your http.HandlerFunc through their GzipHandler and you’re done. It looks like this: package main import ( “io” “net/http” “github.com/nytimes/gziphandler” ) func main() { withoutGz := http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { w.Header().Set(“Content-Type”, “text/plain”) io.WriteString(w, “Hello, World”) }) withGz := gziphandler.GzipHandler(withoutGz) http.Handle(“https://stackoverflow.com/”, … Read more

Avoid public folder of laravel and open directly the root in web server

Let’s assume you have this folder structure in your server .cpanel/ public_html/ public_ftp/ .. And the laravel folder structure is app/ bootstrap/ public/ vendor/ composer.json artisan .. You can create a folder name mylaravelsite on your server inline with public_html and public_ftp folder, and copy to it the whole laravel application except the public folder … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)