Skip to content

Instantly share code, notes, and snippets.

View andrioid's full-sized avatar

Andri Óskarsson andrioid

View GitHub Profile
@andrioid
andrioid / Dockerfile
Last active July 5, 2018 08:27
docker-compose with CompileDaemon, Postgres and go-micro
# build/base-image/Dockerfile
FROM golang:1.10-alpine
ENV GOBIN /go/bin
RUN apk add --no-cache git
RUN go get -u github.com/golang/dep/cmd/dep && go get -u github.com/githubnemo/CompileDaemon
VOLUME ["/go/src/gitlab.com/parkpark/parking"]
@andrioid
andrioid / resume.json
Last active July 3, 2019 17:53
CV in JSON Resume format
{
"basics": {
"name": "Andri Óskarsson",
"label": "Computer Engineer",
"picture": "https://andri.dk/static/3a12aa0364d1851eaab41841f8a12b88/284df/coffee-art.jpg",
"email": "m@andri.dk",
"website": "https://andri.dk",
"summary": "Driven, independent Software Developer with a broad skill set.",
"location": {
"city": "Aalborg",
@andrioid
andrioid / nosense.tcl
Created February 10, 2023 08:14
Old Eggdrop script I made for handling a busy Icelandic IRC channel
# nosense.tcl by Andri Oskarsson
# - merlin@scrolls.org
# - Merlin@IRCnet
#
# designed to detect lines that are not classified as an actual conversation
# - It currently detects: caps, repeat, colors, bold, reverse, disturbance and more
# To mark channels for nosense detection do like (.chanset #channel +nosense)
# Lets make it so
@andrioid
andrioid / something.tsx
Created May 8, 2024 13:01
Fetch all the pages with useInfiniteQuery
const uq = useInfiniteQuery({
queryKey: ["all_contacts"],
queryFn: ({ pageParam }) =>
api.getContacts({
page: pageParam,
}),
getNextPageParam: (lastPage) => {
if (lastPage.pagination.hasNextPage === false) return null;
return lastPage.pagination.currentPage + 1;
},