Skip to content

Instantly share code, notes, and snippets.

View andy5995's full-sized avatar

Andy Alt andy5995

View GitHub Profile
@ccoVeille
ccoVeille / rmw.fish
Created March 20, 2024 15:41
fish autocomplete for github.com/theimpossibleastronaut/rmw 0.9.2
# fish autocomplete for rmw
# put this file in ~/.config/fish/completions/rmw.fish
# and that's it
complete rmw -l version -d 'Display rmw version'
complete rmw -s h -l help -d 'display help'
complete rmw -s v -l verbose -d 'Explain what is done'
complete rmw -s R -s r -l recursive -d 'Recursively remove subdirs'
complete rmw -s i -l interactive -d 'Prompt for removal (not implemented)'
complete rmw -s f -l force -d 'Never prompt for removal'
@lmorchard
lmorchard / Dockerfile
Created February 27, 2023 03:34
Dockerfile extending bbsio/synchronet to add DOSEMU
FROM bbsio/synchronet:latest
ARG DOSEMU_DEB_URL=http://ftp.us.debian.org/debian/pool/contrib/d/dosemu/dosemu_1.4.0.7+20130105+b028d3f-2+b1_amd64.deb
ARG DOSEMU_DEB=dosemu_1.4.0.7+20130105+b028d3f-2+b1_amd64.deb
RUN apt-get update \
&& apt-get install -y rsh-redone-client locales locales-all \
mtools dosfstools dos2unix ser2net socat
ENV USER=root LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 LANGUAGE=en_US.UTF-8

Elderberry and Blackberry Wine

Ingredients

3.5kg fruit, ~50:50 elderberries and blackberries.

2.1kg sugar

@dangarbri
dangarbri / Makefile
Last active August 26, 2022 01:53
Makefile for building programs with cosmopolitan libc
# License: MIT
# Copyright (c) 2022 Daniel Garcia-Briseno
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
@Jammyjamjamman
Jammyjamjamman / Makefile
Last active December 10, 2022 07:29
makefile example #2
# Another simple make example. Creates 2 bins which include the same c file.
# Assumes e.g. you have main.c, main2.c, mylib.c and mylib.h.
# CC = gcc # Optional. Will use system default if not given here e.g. gcc or clang.
CFLAGS = -g -Wall -fanalyzer # $(shell pkg-config --cflags openssl)
# LIBS=$(shell pkg-config --libs openssl)
# LDFLAGS = $(LIBS)
bins = myprogram1 myprogram2
all: $(bins)
@Jammyjamjamman
Jammyjamjamman / Makefile
Last active June 23, 2022 20:40
Dead simple makefile (in this case for building openssl bins).
# CC = gcc # Optional. Will use system default if not given here e.g. gcc or clang.
CFLAGS = -g -Wall -fanalyzer $(shell pkg-config --cflags openssl)
LIBS=$(shell pkg-config --libs openssl)
LDFLAGS = $(LIBS)
bins = decrypt_file encrypt_file
all: $(bins)
clean:
@for file in $(bins); do \
@Jammyjamjamman
Jammyjamjamman / gh-actions-configuring.yml
Created May 13, 2022 21:34
some snippets for github actions
# Cancel workflow if new workflow in same group is in progress.
# https://docs.github.com/en/enterprise-cloud@latest/actions/using-jobs/using-concurrency
name: Build
concurrency:
group: build-${{ github.ref }}
cancel-in-progress: true
# allow only certain types of pull_request.
pull_request:
types: [ opened, reopened, synchronize ]
@Jammyjamjamman
Jammyjamjamman / bash_stuff.sh
Last active January 8, 2023 21:33
bash_stuff.sh
#!/bin/sh
# Credits to Andy5995 for finding many (currently all) of these commands.
# commands for indenting C code with 2 spaces
indent -ci2 -bl -bli0 -nut -npcs *.c *.h
# If you make a script from this command...
indent -ci2 -bl -bli0 -nut -npcs $1 $2
# build with openssl
@Jammyjamjamman
Jammyjamjamman / get_foldersizes.ps1
Last active May 7, 2022 20:37
Basic powershell script to get folder sizes in current dir (depth 1).
Get-ChildItem -Directory | ForEach-Object {
echo "Folder: $($_.Name)"
echo "Size: $((Get-ChildItem $_.Name -Recurse | Measure-Object -Property Length -Sum).Sum/(1024*1024*1024))GiB"
echo ""
}
@sl5net
sl5net / local.cfg
Last active July 13, 2022 01:59
local.cfg
UserRatingBackup = "1075"
adaptivefps.menu = "43.59925842285156"
adaptivefps.session = "24.601099014282227"
autociv.data.mute = "%7B%7D"
autociv.data.playerReminder = "%7B%22jews%22%3A%22Warning%3AleftAlwaysInSeconds%22%2C%22ELBOTIJA%22%3A%22Warning%3AleftAlwaysInSeconds%22%2C%22._%22%3A%22Warning%3AleftAlwaysInSeconds%22%2C%22todolomeo%22%3A%22Warning%3AleftAlwaysInSeconds%22%2C%22yasa.baris%22%3A%22Warning%3AleftAlwaysInSeconds%22%2C%22Higgs%22%3A%22Warning%3AleftAlwaysInSeconds%22%7D"
autociv.data.playersBox = "%7B%22selected_column%22%3A%22rating%22%2C%22selected_column_order%22%3A-1%7D"
autociv.gamesetup.countdown.enabled = "false"
autociv.gamesetup.countdown.time = "5"
autociv.lobby.chat.subject.hide = "true"
autociv.lobby.gamelist.showHostName = "true"