Skip to content

Instantly share code, notes, and snippets.

@darealshinji
darealshinji / tango-input-gaming.svg
Created June 7, 2023 18:45
"input-gaming" icon from Tango icon theme
View tango-input-gaming.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View gcc2msvc.txt
Opt:
-O0 -Od
-O2 -O2 -Ot
-O3 -Ox -Ot
-Os -O1 -Os
-fomit-frame-pointer -Oy
Code gen:
-f[no-]rtti -gr[-]
View gnu_coreutils_cp_copy_progress.patch
Patch for coreutils 9.1 to copy a directory with a progress shown.
Better alternative: https://github.com/dmerejkowsky/pycp
--- a/src/copy.c
+++ b/src/copy.c
@@ -1815,16 +1815,80 @@
&& ! overwrite_ok (x, dst_name, dst_dirfd, dst_relname, dst_sb)));
}
+// GPL3, Copyright (C) 2016 Xfennec, CQFD Corp.
+// https://github.com/Xfennec/progress/blob/master/sizes.c
View checkrt.c
// MIT License
// Copyright (c) 2021 djcj <djcj@gmx.de>
// Elf file parsing code was taken from https://github.com/finixbit/elf-parser
// Copyright (c) 2018 finixbit
// 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
View render_svg.c
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <float.h>
#include <inttypes.h>
#include "nanosvg.h"
#define NANOSVGRAST_IMPLEMENTATION
#include "nanosvgrast.h"
#define STB_IMAGE_WRITE_IMPLEMENTATION
#include "stb_image_write.h"
@darealshinji
darealshinji / Makefile
Created January 11, 2021 06:22
lzma 1900 sdk Linux
View Makefile
OBJS = \
7zAlloc.o \
7zArcIn.o \
7zBuf.o \
7zBuf2.o \
7zCrc.o \
7zCrcOpt.o \
7zDec.o \
7zFile.o \
7zStream.o \
@darealshinji
darealshinji / wslpath.c
Last active January 10, 2021 10:10
wslpath wrapper
View wslpath.c
/**
* This is free and unencumbered software released into the public domain.
*
* Anyone is free to copy, modify, publish, use, compile, sell, or
* distribute this software, either in source code form or as a compiled
* binary, for any purpose, commercial or non-commercial, and by any
* means.
*
* In jurisdictions that recognize copyright laws, the author or authors
* of this software dedicate any and all copyright interest in the
@darealshinji
darealshinji / tinybunny_unix.sh
Last active January 9, 2021 17:02
download files to play "Tiny Bunny" natively on Linux and Mac
View tinybunny_unix.sh
#!/bin/sh
set -e
set -x
gamedir="Tiny Bunny"
sdkver="7.3.5"
if [ "$(printf "$PWD" | tail -c28)" = "/steamapps/common/Tiny Bunny" ]; then
gamedir="."
fi
View launch-steam.sh
#!/bin/bash
# requires fltk-dialog to be in PATH
# https://github.com/darealshinji/fltk-dialog/releases/tag/continuous
steamconfig="${HOME%/}/.steam"
pidfile="$steamconfig/steam.pid"
steambin="$steamconfig/steam/steam.sh"
logfile="$(mktemp)"
pid_steam=0
pid_launcher=0
View rotate_FL_RGB_Image.cxx
#include <FL/Fl.H>
#include <FL/Fl_Box.H>
#include <FL/Fl_Double_Window.H>
#include <FL/Fl_GIF_Image.H>
#include <FL/Fl_JPEG_Image.H>
#include <FL/Fl_PNG_Image.H>
#include <FL/Fl_XBM_Image.H>
#include <string.h>
enum {