Skip to content

Instantly share code, notes, and snippets.

View mjarkk's full-sized avatar
🗿

Mark Kopenga mjarkk

🗿
View GitHub Profile
@mjarkk
mjarkk / a_struct_to_json.go
Created May 17, 2019 05:45
Confert a golang struct into usable type data
package main
import (
"encoding/json"
"fmt"
"reflect"
)
type Test2 struct {
B string
@mjarkk
mjarkk / My void linux install - Dell XPS 15 9560 (4k).md
Last active April 1, 2023 00:22
How i've installed voidl inux on my laptop

void linux - dell xps 15 9560 (4k)

How i've installed void inux (xfce) on my laptop

Image and flash

The install iso i've used: void-live-x86_64-{version_here}-xfce.iso from: https://a-hel-fi.m.voidlinux.org/live/current/
To flash the iso i've used rufus with it's default settings.

before installing

I like to start with a clean disk so i'll start

Keybase proof

I hereby claim:

  • I am mjarkk on github.
  • I am mjarkk (https://keybase.io/mjarkk) on keybase.
  • I have a public key whose fingerprint is 75D1 0043 D24C 1560 463F 3621 E5E3 30D0 DBBE 5AA9

To claim this, I am signing this object:

@mjarkk
mjarkk / gpg_keys.sh
Created October 18, 2019 14:36
A cheat sheet for my gpg keys
# Import my key ([email protected])
curl https://keybase.io/mjarkk/pgp_keys.asc | gpg --import
@mjarkk
mjarkk / log.go
Last active June 3, 2020 12:48
a small go file for quickly logging things in tui applications
package
import (
"fmt"
"os"
)
func l(v ...interface{}) {
f, _ := os.OpenFile("debug.log", os.O_RDWR|os.O_CREATE|os.O_APPEND, 0666)
fmt.Fprintln(f, v...)
@mjarkk
mjarkk / windows_dev_station.md
Last active August 21, 2024 08:23
How i use windows for development

screenshot
Background: crowned > need for speed, Fluent terminal with Bright Lights theme

My Windows dev setup / howto

Rambelings

Ya windows the worst os to program on or is it.
For a long time i've been fully againced windows and i still kinda agree if you use it without "cheating". Windows it just too unstable and too un-standardized to work with on it's own, it's like using mac os with it's forever taking updates but combined with non-standardized tooling and a lot of unexpected bahavior what just results in a lot of frustration.
For example why can i see ls taking time to display lines in powershell???, ya it's only ~50ms but still why does a simple command like ls has to take so long??
Or why sometimes do programs not stop running when i press ctrl+c and do i need to open task manager and scroll to the program because there is no search bar so i can find it quickly??

A cheatsheet for installing FreeBSD

Corsair keyboard not working

Press the win key lock + F1 for 3 seconds. (this puts the keyboard in some kind of special mode where it behaves like an old keyboard)

Deafult programs

pkg install vim nano sudo

visudo

My gentoo cheet sheet

Install vscode

sudo emerge eselect-repository
sudo eselect repository enable pentoo
sudo emaint sync -r pentoo
su -c 'echo "app-editors/visual-studio-code ~amd64" >> /etc/portage/package.accept_keywords'
sudo emerge app-editors/visual-studio-code
@mjarkk
mjarkk / My chrome os dev setup.md
Last active August 9, 2021 09:29
My chrome os dev setup

Ran on my Dell XPS 15 9560 (4k) using brunch with the rammus recovery

Why?

Mostly funs.

Findings

Great things:

  • Battery seem to be better than linux, equal to windows.
  • With normal usage laptops doesn't get hot even while wathcing 4k videos on youtube. Note that this also results in way less often the fan ramping up :)
  • Crostini works great and is by default setup to passtough localhost.
@mjarkk
mjarkk / app.sh
Created December 4, 2020 15:23
brioche app in brioche shell
#!/bin/bash
if [ -z "$CONTAINER_GPU" ]; then CONTAINER_GPU=0; fi
echo "#!/bin/bash" > ~/.brioche_last_app.sh
echo "xhost +" >> ~/.brioche_last_app.sh
echo "/usr/bin/start-pulseaudio-x11" >> ~/.brioche_last_app.sh
echo "${@:1}" >> ~/.brioche_last_app.sh
chmod 0755 ~/.brioche_last_app.sh