As configured in my dotfiles.
start new:
tmux
start new with session name:
module ApiRepresenter | |
include Roar::Representer::JSON | |
property :name | |
end | |
module ApisRepresenter | |
include Representable::JSON::Collection | |
self.representation_wrap= :items |
### Keybase proof | |
I hereby claim: | |
* I am albertoleal on github. | |
* I am albertoleal (https://keybase.io/albertoleal) on keybase. | |
* I have a public key whose fingerprint is 8546 4568 C761 48C5 4826 1137 1B4C 8442 E30B 7488 | |
To claim this, I am signing this object: |
package main | |
import ( | |
"fmt" | |
"log" | |
"net/http" | |
"time" | |
"github.com/gorilla/context" | |
"github.com/codegangsta/negroni" |
func (a *Auth) Login(email, password string) string { | |
url, err := GetURL("/api/login") | |
if err != nil { | |
return err.Error() | |
} | |
b := bytes.NewBufferString(`{"email":"` + email + `", "password":"` + password + `"}`) | |
req, err := http.NewRequest("POST", url, b) | |
if err != nil { | |
return err.Error() | |
} |
package main | |
import ( | |
"bytes" | |
"io" | |
"io/ioutil" | |
"net/http" | |
) | |
func handler(w http.ResponseWriter, r *http.Request) { |
As configured in my dotfiles.
start new:
tmux
start new with session name:
package main | |
import ( | |
"fmt" | |
"sync" | |
"github.com/cloudfoundry-incubator/garden" | |
"github.com/cloudfoundry-incubator/garden/client" | |
"github.com/cloudfoundry-incubator/garden/client/connection" | |
) |
type Server interface { | |
Running() bool | |
Start() error | |
Stop() error | |
} | |
type cache struct { | |
MagicNumber byte | |
MessageType byte |
# RUN apt-get install -y uidmap btrfs-tools sudo | |
RUN apt-get update | |
RUN apt-get install -y uidmap wget sudo liblzo2-dev libblkid-dev e2fslibs-dev pkg-config libz-dev curl | |
RUN wget https://www.kernel.org/pub/linux/kernel/people/kdave/btrfs-progs/btrfs-progs-v4.7.3.tar.xz && \ | |
tar xf btrfs-progs-v4.7.3.tar.xz && \ | |
cd btrfs-progs-v4.7.3 && \ | |
./configure --disable-documentation && \ | |
make static && make install-static && \ | |
files=$(ls *.static) && \ |