Skip to content

Instantly share code, notes, and snippets.

Avatar
🌱
​[object Object]

Rui Afonso Pereira rpereira

🌱
​[object Object]
View GitHub Profile
@rpereira
rpereira / Dockerfile
Last active Feb 15, 2020
Setup Docker for Go development with hot reload
View Dockerfile
FROM golang:latest
RUN mkdir /app
WORKDIR /app
ADD . /app
RUN go get github.com/githubnemo/CompileDaemon
RUN go get github.com/gin-gonic/gin
ENTRYPOINT CompileDaemon --build="go build main.go" --command=./main
@rpereira
rpereira / User.hs
Last active May 29, 2017
Customize JSON instances
View User.hs
-- | Goal is not to expose sensitive user data such as the field email.
--
-- When creating the user, the request body only has: username, email, bio (optional), image (optional)
-- When returning the user, I only want to show: username, bio, image.
--
-- Error:
-- /Users/rap/code/thesis/ninja/src/Api.hs:52:11: error:
-- • No instance for (aeson-1.0.2.1:Data.Aeson.Types.ToJSON.ToJSON
-- (persistent-2.6.1:Database.Persist.Class.PersistEntity.Entity
-- Models.User.User))
View keybase.md

Keybase proof

I hereby claim:

  • I am rpereira on github.
  • I am rpereira (https://keybase.io/rpereira) on keybase.
  • I have a public key whose fingerprint is 8761 BC55 855F C177 AE74 E405 F2D9 7CF6 F115 6874

To claim this, I am signing this object:

@rpereira
rpereira / rap.asc
Created Sep 3, 2016
GPG public key: Rui Afonso Pereira <ruiafonsopereira@gmail.com> (F1156874)
View rap.asc
-----BEGIN PGP PUBLIC KEY BLOCK-----
mQINBFfLPmUBEADFpYCZz+WZkEsNWZONeNf9SDvltsWyYqxaWr8s527A9J01O0Rz
AHS/ELU9S9g1sD0F2ui1iCrXdz4q943lGkl3oAToPHJ3Uim32BFyBTscX13+eh6x
5Gg1SvRXQRLxthxvphqkVNZitOPx6LcYNWnlOpzDqm+koVjqaRs7KElgLGgQdWO/
vw+hELU9fxUD6jDPtCg+gSDHLy3VUUCRtIi18VhT+AQ1urFSDel1/HWMQ7K6bXNU
RPYInFkh5fZgqCyznnjIxBMqL1nGOVAgnm/fvxSbU06uJNrF8zgldx9+cgD5FsZV
tHEkM/u61i7Qaxv5HTHZ5WnkDXm+JYUimbHgP/pT/gHQriEMRWlo7lvDbusOv8ar
odRBkUB0RB9dk1xx4DNEh2PfUbD9DnS9OAeviE4sU2S7R1nfNJe9B7yeaOPhD5yi
cfa2XeSrMkoyznHyot14JYHtP6Wn1f6/JsKZEzD2RBDdG9pv92Y+ILFr7g0JNYcy
@rpereira
rpereira / slack_solarized_dark_theme
Created Jul 9, 2016
Solarized Dark theme for Slack
View slack_solarized_dark_theme
#073642,#002B36,#B58900,#FDF6E3,#CB4B16,#FDF6E3,#2AA198,#DC322F