Skip to content

Instantly share code, notes, and snippets.

View joseph0x45's full-sized avatar

Joseph Dogbevi joseph0x45

View GitHub Profile
@joseph0x45
joseph0x45 / index.md
Last active June 9, 2024 11:05
How I develop my Go apps in containers using Neovim and docker compose

Hello reader. I have been trying to replicate the dev container experience that I had when I was still using vscode (I use neovim now btw) but it wasn't quite that, I tried some neovim plugins but didn't really like it. But I'm happy to tell you that I finally got something, just for Golang apps, but we are getting there. Let's quickly see how I achieved this.

Required dependencies

You will need docker and docker compose installed on your system. I use Manjaro so for me installing these two was as easy as running

pamac install docker docker-compose

Once you have these two installed you will need a text editor, I will be using neovim. What I mean by the "dev container experience" is to be able to have my code on my host, but run and debug it inside a container so that way my computer doesn't have any dependencies and I can easily reproduce the dev environment on another PC without having a "it worked on that other machine" moment. As exemple we will build a simple Go app that returns "Hello world

@joseph0x45
joseph0x45 / learning_a_new_language.md
Last active April 2, 2025 16:42
Learning a new language, mistakes I've made and how I do it now

Learning a new language : Mistakes I've made and how I do it now

learning

Learning new things is a big part of every developer journey, most of us learn new things almost everyday. In an industry that is in constant motion, we have to adapt. Existing tools might change, new tools are always getting released all over the place, it's not about knowing about all of them, but about knowing enough about the tools that you use most and that are more relevant to you. It is also a good and refreshing experience to go out of your comfort zone and try out other tools to see how they solve the same problems we all are trying to solve.

A little story about me

When I was in college, I genuinely believed that the quality of a software developer came with the number of languages in which the said developer can program. So, in pursuit of greatness, I started learning a new language every week. "Learning" . My method at that time was very simple:

  • Pick a langu
@heyimalex
heyimalex / sqlmap.go
Last active March 7, 2025 01:50
Functions for querying directly into map[string]interface{}
// Package sqlmap provides functions for querying directly into
// map[string]interface{}.
//
// In developing really simple api endpoints, I found the boilerplate needed
// to take the results of a database query and output them as JSON to be
// really fucking annoying; make a custom struct, scan into that struct, if
// there are multiple rows do the whole rows.Next() song and dance, and if
// anything changes update the three spots each column of the result is now
// dependent on. Even when using libraries like sqlx, there's still a lot of
// extraneous code that needs to be written.
@julz
julz / main.go
Created November 20, 2015 12:39
containersched minicontainer
package main
import (
"fmt"
"os"
"os/exec"
"syscall"
)
func main() {