Skip to content

Instantly share code, notes, and snippets.

View marcs-feh's full-sized avatar
🍺
There's only one beer left

marcs feh marcs-feh

🍺
There's only one beer left
View GitHub Profile
#!/bin/sh
# Taken mostly from Gentoo's handbok
newRoot="$1"
printf "chroot into '$newRoot'?(y/N) "
read confirm
[ "$confirm" = "y" ] && {
# Mount required filesystems
mkdir -p "$newRoot"
@marcs-feh
marcs-feh / serve-file.py
Created November 15, 2022 15:24
Quickly serve a file using flask, I use this frequently to transfer files to a VM using port fowarding
#!/usr/bin/env python
from sys import argv, exit
from flask import Flask
from os.path import exists
PORT=8069
def main():
if len(argv) < 2:
@marcs-feh
marcs-feh / init.vim
Last active August 27, 2024 22:31
Quick neovim cfg
" Simple init.vim that's compatible with Neovim and Vim
let g:Tabsize=4
let g:JKEscape=v:true
" Syntax and colors
" if exists('g:syntax_on')
" syntax on
" endif
@marcs-feh
marcs-feh / rivertile-pertag-2023-03-13.diff
Created March 13, 2023 14:17
Rivertile pertag behavior
diff --git a/rivertile/main.zig b/rivertile/main.zig
index 6b9c458..cbef542 100644
--- a/rivertile/main.zig
+++ b/rivertile/main.zig
@@ -1,5 +1,4 @@
// This file is part of river, a dynamic tiling wayland compositor.
-//
// Copyright 2020-2021 The River Developers
//
// This program is free software: you can redistribute it and/or modify
@marcs-feh
marcs-feh / init.lua
Last active June 14, 2023 22:31
Extra thicc all-in-one-place init.lua for neovim, quite useful for remote machines
--- General Options ---
do
local options = {
backup = false,
hidden = true,
clipboard = "unnamedplus",
cmdheight = 1,
completeopt = { "menuone", "noselect" },
conceallevel = 0,
fileencoding = "utf-8",
;; Options for this config file
(defconst option/alternative-evil-esc (kbd "C-c"))
(defconst user/font "JetBrains Mono NL Light")
(defconst user/font-height 120)
(defconst user/theme 'modus-vivendi)
(defconst user/use-alt-window-navigation t)
;; Disable startup message, scrollbar, toolbar, menu bar and visual bell for a
;; cleaner UI. Also use smaller tab width
(setq inhibit-startup-message t)
@marcs-feh
marcs-feh / main.odin
Created April 21, 2024 23:58 — forked from SorenSaket/main.odin
GLFW, OpenGL Window Tutorial in Odin language
// GLFW and OpenGL example with very verbose comments and links to documentation for learning
// By Soren Saket
// semi-colons ; are not requied in odin
//
// Every Odin script belongs to a package
// Define the package with the package [packageName] statement
// The main package name is reserved for the program entry point package
// You cannot have two different packages in the same directory
-- Main colors
bg = '#121212',
bg_alt = '#222222',
bg_br = '#424242',
bg_br_alt = '#525252',
fg = '#ece7dd',
fg_alt = '#ecd9b2',
UEsDBBQAAgAIAOiCNFkXTSdwuAQAALQLAAAGABwALnZpbXJjVVQJAAOky+1mpMvtZnV4CwABBOgDAAAE6AMAAI1WUW/bNhB+16+4BnWVoHGbtHtIBUvD4HYt1q7DlqDbsK4rTZ0sxhTJkZScFPvxO1Ky4sxOswRReMeP3x2PxzsewLlojEQQSvgnnWjA18ynDrhuDPNiQVNr4Wt4jzrMMlXCB9EkiUQPy+yCLZz4gvk3g/zD21eOM4N5l3nbYpIcwGtUaJkEbbzQyiWOgErf0MeVjzwReW3ykbJXu1pUfi1KX/93phJS8ppZl6cdWp9BOjAvGF+1Jgq1KEtUccilMAvNbJm3SrEGSyPb3hfelDWKZe3z017WIR4eyd+8QdVqhcdKO5TI/QBQHJmU2KHMT6KKnEFUXJdCLfPWV9OzwZlaOmSW11EUim9LS6UtcuYwio1uHeYsjk3bbFw6GYhcrdeNLntsEChgUijMn0WNZM47z3zrBoVrmPUjuTNS+AVKvb4RbTCwYV8zE/YQRS8a1K2XqPKzk439VpV6RLSmZB4DLn8+IKI9oSjcG861FR63DkNpvDKUPuR4bwZts2wF11LbMSta67QN++oVbbNAO8xZlJQwHW4r47BPj+e9GxRVYmwblSs9OsJ6DyotywZ9rct8y9OgjWdJ8bM+f/GiJ+JWS6mrKj8biEu80Z32QQ67W9oQm7xkdpUk/Wag7aUDujTeruGnIfP7K6KC7q8VoimFhRxObukXTNF1gR09pTICBP3pLf1aqHAnSP/8JFh8i9cL2hzloUuqVvFg+QG4rGHmMOTPMYSDX6I9BhYnjxIAvELeegSWBQg8gTSEm5bAzNGZK19ASlqWDWsDYtD0JAmqcmMtScbF54ZxLGD2Xpti8Jr0ElmJNieGLZ3m4UaNEyPHz8Pqjfx2kBNRbZUb2sMBXNQInz8BKtdadLGO0QehTyqg4712oFXUhfsCoXyQ/7Qff22wJJLgxBCsVKTHkF6uwnf26nxefP6UHsE/u5DV
@marcs-feh
marcs-feh / a.go
Created October 28, 2024 00:58
yes
package main
import (
"fmt"
"time"
)
const BlocksPerDay = 48
type Block struct {