Skip to content

Instantly share code, notes, and snippets.

View buffet's full-sized avatar
:shipit:

buffet buffet

:shipit:
View GitHub Profile
@buffet
buffet / overlay.nix
Created July 21, 2023 09:27
nix package list
# ~/.config/nixpkgs/overlays/<filename>.nix
self: super: {
my-packages = super.stdenvNoCC.mkDerivation {
name = "my-packages";
dontUnpack = true;
propagatedBuildInputs = with super; [
hello
];
};
@buffet
buffet / init.lua
Created March 14, 2020 14:34
minimal floating config
local cursor = kiwmi:cursor()
cursor:on("motion", function ()
local view = cursor:view_at_pos()
if view then
view:focus()
end
end)
@buffet
buffet / compgen.sh
Created March 2, 2020 20:42
compgen.sh
#!/bin/sh
IFS=:; for dir in $PATH; do
for file in "$dir"/*; do
if test -f "$file" -a -x "$file"; then
printf '%s\n' "${file##*/}"
fi
done
done
@buffet
buffet / mapgen.c
Created July 6, 2019 13:14
Map generator
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#define MAPSIZE_X 300
#define MAPSIZE_Y 93
#define MIN_WALKERS 1
#define MAX_WALKERS 10
#define WALKER_CHANCE_DIE 70
@buffet
buffet / _
Created May 23, 2019 22:05
Producer/Consumer
/* Copyright (c), Niclas Meyer <niclas@countingsort.com>
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at https://mozilla.org/MPL/2.0/.
*/
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#!/usr/bin/env bash
male='Alek Andrej Anton Balthazar Bogan Boris Dargos Darzin Dragomir Emeric Falkon Frederich Franz Gargosh Gorek Grygori Hans Harkus Ivan jirko Kobal Korga Krystofor Lazio Livius Marek Miroslav Nikolaj Nimir Oleg Radovan Radu Seraz Sergei Stefan Tural Valentin Vasily Vladislav Waltar Yesper Zsolt'
female='Alana Clavdia Danya Dezdrelda Diavola Dorina Drasha Drilvia Elisabeta Fatima Grilsha Isabella Ivana Jarzinka Kala Katerina Kereza Korina Lavinia Magda Marta Mathilda Minodora Mirabel Miruna Nimira Nyanka Olivenka Ruxandra Serina Tereska Valentina Vasha Victoria Wensencia Zondra'
family='Alastroi Antonovich/Antonova Barthos Belasco Cantemir Dargovich/Dargova Diavolov Diminski Dilisnya Drazkoi Garvinski Grejenko Groza Grygorovich/Grygorova lvanovich/lvanova Janek Karushkin Konstantinovich/Konstantinova Krezkov/Krezkova Krykski Lansten Lazarescu Lukresh Lipsiege Martikov/Martikova Mironovich/Mironovna Moldovar Nikolovich/Nikolova Nimirovich/Nimirova Oronovich/Oronova Petrovich/Petrovna Pole
@buffet
buffet / quine
Created March 8, 2019 11:43
bash quine
#!/usr/bin/env bash
s="#!/usr/bin/env bash
s=\"%s\"
s=\"\${s//\\\\/\\\\\\\\}\"
s=\"\${s//\\\"/\\\\\\\"}\"
s=\"\${s//\$/\\\\\$}\"
printf \"\${s//\\\\\$/\$}\" \"\$s\"
"
@buffet
buffet / README.md
Created February 20, 2019 09:53
flourl

flourl

open urls, supports bangs

Usage

Create a file $XDG_CONFIG_HOME/flourl/bangs like this.

yt https://youtube.com/
@buffet
buffet / main.c
Created October 13, 2018 15:03
leberkaes
#include <ncurses.h>
int
main(void)
{
int ch;
initscr();
cbreak();
noecho();