Skip to content

Instantly share code, notes, and snippets.

View marvhus's full-sized avatar
🎯
Focusing

Martin marvhus

🎯
Focusing
View GitHub Profile
@marvhus
marvhus / README.md
Last active April 23, 2024 18:51
Floating Point Precision in x86-64 Assembly

Floating Point Precision in x86-64 Assembly

The lack of precison you get with floating point numbers isn't a language problem, it's a problem with floating point nubers themselves, so it even shows up as low as x86-64 assembly.

The assembly in the file bellow is the code I have written to showcase this.

To compile it you have to do this:

$ nasm floats.asm -o floats.o -f elf64
@jdah
jdah / network_demo.c
Created January 31, 2024 14:22
the world's most basic client/server
#include <stdio.h>
#include <string.h>
#include <arpa/inet.h>
#include <sys/socket.h>
#include <netdb.h>
#include <unistd.h>
static void server() {
// create socket
@Softwave
Softwave / README.md
Last active July 4, 2024 06:06
Fibonacci Program

Fib

Simple fibonacci number calculator.

Usage: fib nth Fibonacci number

@n00bmind
n00bmind / first.jai
Created December 24, 2022 16:33
Jai OpenGL setup
#import "Basic";
#scope_file
#import "String";
#import "System";
#import "Window_Creation";
#import "Input";
#import "Windows";
#import "GL"; //( DUMP_GL_ERRORS = true );
@MkItReignn
MkItReignn / .vimrc
Last active July 18, 2022 22:03 — forked from jdah/.vimrc
jdh's NeoVim .vimrc
call plug#begin()
Plug 'drewtempelmeyer/palenight.vim'
Plug 'vim-airline/vim-airline'
Plug 'wlangstroth/vim-racket'
Plug 'sheerun/vim-polyglot'
Plug 'rust-lang/rust.vim'
Plug 'preservim/tagbar'
Plug 'universal-ctags/ctags'
Plug 'luochen1990/rainbow'
Plug 'vim-syntastic/syntastic'
@jdah
jdah / .tmux.conf
Created July 15, 2021 12:47
.tmux.conf
# plugins
set -g @plugin 'thewtex/tmux-mem-cpu-load'
# Remap prefix to C-a
set -g prefix 'C-\'
unbind-key C-b
unbind-key C-a
# vi-like keybindings
@jdah
jdah / .vimrc
Created June 14, 2021 11:54
jdh's NeoVim .vimrc
call plug#begin()
Plug 'drewtempelmeyer/palenight.vim'
Plug 'vim-airline/vim-airline'
Plug 'wlangstroth/vim-racket'
Plug 'sheerun/vim-polyglot'
Plug 'rust-lang/rust.vim'
Plug 'preservim/tagbar'
Plug 'universal-ctags/ctags'
Plug 'luochen1990/rainbow'
Plug 'vim-syntastic/syntastic'
@A6GibKm
A6GibKm / mu4e.md
Last active April 21, 2024 12:13
Read your emails with mu4e

Connecting emacs and Protonmail Bridge

This guide will cover the basics on how to integrate emacs with protonmail-bridge using

Configuring mbsync

@yogidevbear
yogidevbear / emacs-keybinding-cheatsheet.md
Last active November 14, 2023 15:35
Emacs keybinding cheatsheet
Keys Description
C Ctrl
M Alt
Helper functions:
C-h k key-binding Describe the function bound to the key binding. To get this to work, you actually perform the key sequence after typing C-h k.
C-h f Describe function.
Cider/REPL bindings:
M-x cider-jack-in Jack into the REPL
Window key bindings:
@konarev
konarev / gist:0c8dda014ab0c87403f356a52b48c61a
Created February 1, 2018 07:00
~/.config/compton.conf
backend = "glx";
paint-on-overlay = true;
glx-no-stencil = true;
vsync = "opengl-swc";
unredir-if-possible = true;
# Shadow
shadow = true; # Enabled client-side shadows on windows.
no-dock-shadow = true; # Avoid drawing shadows on dock/panel windows.
no-dnd-shadow = true; # Don't draw shadows on DND windows.