(C-x means ctrl+x, M-x means alt+x)
The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf:
| package main | |
| import ( | |
| "fmt" | |
| "github.com/codegangsta/negroni" | |
| "github.com/gorilla/mux" | |
| "log" | |
| "net/http" | |
| ) |
| package main | |
| import ( | |
| "fmt" | |
| "net/http" | |
| "github.com/gorilla/mux" | |
| ) | |
| func handler(name string)func (http.ResponseWriter, *http.Request) { | |
| dummyHandler := func (w http.ResponseWriter, r *http.Request) { |
| Using MongoDB in golang with mgo |
| package main | |
| import ( | |
| "fmt" | |
| "time" | |
| ) | |
| // Suggestions from golang-nuts | |
| // http://play.golang.org/p/Ctg3_AQisl |
| package main | |
| import ( | |
| "net/http" | |
| "log" | |
| ) | |
| func redirect(w http.ResponseWriter, req *http.Request) { | |
| // remove/add not default ports from req.Host | |
| target := "https://" + req.Host + req.URL.Path | |
| if len(req.URL.RawQuery) > 0 { |
| package main | |
| import ( | |
| "crypto/tls" | |
| "crypto/x509" | |
| "fmt" | |
| "io" | |
| "log" | |
| ) |
create different ssh key according the article Mac Set-Up Git
$ ssh-keygen -t rsa -C "your_email@youremail.com"
| <?xml version="1.0" encoding="utf-8"?><!-- | |
| ~ Copyright (C) 2015 The Android Open Source Project | |
| ~ | |
| ~ Licensed under the Apache License, Version 2.0 (the "License"); | |
| ~ you may not use this file except in compliance with the License. | |
| ~ You may obtain a copy of the License at | |
| ~ | |
| ~ http://www.apache.org/licenses/LICENSE-2.0 | |
| ~ | |
| ~ Unless required by applicable law or agreed to in writing, software |