Let’s write it down.

To be honest I don’t remember when I actually started thinking about writing down most the solutions I found over the internet or implemented myself. I realized that from time to time I go back to solutions, code snippets or config files I created or modified to fulfill some specific requirements. Good is it I wrote it down somewhere, put on Gist or Pastebin but what if I did not ? Let’s say I just configured Nginx as loadbalancer and for example after a year or so I need to make something exactly the same or at last similar. What’s then ? I need to go through the NGINX’s documentation again or start searching over google. Sure in some case I remember exactly how I solved some specific problem but when it was some time ago then … This is the reason why I decided to create this simple blog. I hope it wont evolve to any unpredictable way. You can thing about this blog like a about my notebook. If somebody else will find my notes useful/helpful - even better. Let’s make this World better.

Have a great day.

P.S As you probably noticed Im not a native speaker, so in case you guys will find some mistakes in my post (probably more than one) please let me know ASAP.

RAM vCPU Price (€)
1G 1 5
2G 2 10
4G 4 30
8G 6 60
12G 8 120
16G 10 160
24G 12 240
32G 16 320

Our universe (in SI units):



def show
  @widget = Widget(params[:id])
  respond_to do |format|
    format.html # show.html.erb
    format.json { render json: @widget }
  end
end
package interfaces
import (
	"io"
	"os"
)

//PipeExample function
func PipeExample() error {
	r, w := io.Pipe()

	go func() {
		w.Write([]byte("test\n"))
		w.Close()
	}()

	if _, err := io.Copy(os.Stdout, r); err != nil {
		return err
	}
	return nil
}
package interfaces

import (
	"fmt"
	"io"
	"os"
)

// Copy data from std in to std out
func Copy(in io.ReadSeeker, out io.Writer) error {
	w := io.MultiWriter(out, os.Stdout)
	if _, err := io.Copy(w, in); err != nil {
		return err
	}
	in.Seek(0, 0)
	buf := make([]byte, 64)
	if _, err := io.CopyBuffer(w, in, buf); err != nil {
		return err
	}

	fmt.Println()
	return nil
}

–robert