Skip to content

Instantly share code, notes, and snippets.

@OrangeTide
OrangeTide / gmail-mailto
Created February 18, 2024 17:46
Use GMail as default email client on Linux / Ubuntu / Raspbian / Arch
#!/bin/sh
# Installation for using GMail as your preferred application
# This is for handling mime type: x-scheme-handler/mailto
#
# Place this script in your $PATH, and mark as executable
#
# Install the .desktop file:
# cp gmail-mailto.desktop ~/.local/share/applications/
#
@OrangeTide
OrangeTide / makefile
Last active November 10, 2023 16:32
small and low-configuration project Makefile (GNU make required)
# small and low-configuration project Makefile (GNU make required)
# Nov 10 2023 - Jon
# usage:
# 1. place this in the directory of a small C/C++ project.
# 2. modify type= configuration option to select executable or library modes.
# 3. all c/c++ and assembler sources will be linked into a single
# executable or library.
# 4. adjust configuration options for desired compiler and linker flags.
# examples of typical usage:
# make clean
@SuperMarioSF
SuperMarioSF / ModemManager.service
Last active February 28, 2024 01:27
ClockworkPi uConsole A06 Core LTE Module systemd service for automatic startup
[Unit]
Description=Modem Manager
After=polkit.service
Requires=polkit.service
ConditionVirtualization=!container
BindsTo=uConsoleLTE.service
[Service]
Type=dbus
BusName=org.freedesktop.ModemManager1
@SoftwareGuy
SoftwareGuy / ⁄etc⁄pacman.d⁄hooks⁄linux-modules-post.hook
Created December 16, 2021 03:18 — forked from ephemient/⁄etc⁄pacman.d⁄hooks⁄linux-modules-post.hook
(Arch Linux) Keep current modules around during kernel upgrade
[Trigger]
Operation = Upgrade
Type = Package
Target = linux
[Action]
Description = Restore Linux kernel modules
When = PostTransaction
Depends = coreutils
Depends = rsync
@OrangeTide
OrangeTide / bananabread.md
Last active April 2, 2020 03:31
Banana Bread recipe

Banana Bread

Ingredients

  • 2 c flour
  • 1 c sugar
  • 1 1/2 tsp baking powder
  • 1/2 tsp baking soda
  • 1/4 tsp salt
@geekman
geekman / myusbgadget
Created January 17, 2017 02:47
Pi Zero multiple USB gadgets minimal example
#!/bin/bash -e
modprobe libcomposite
cd /sys/kernel/config/usb_gadget/
mkdir g && cd g
echo 0x1d6b > idVendor # Linux Foundation
echo 0x0104 > idProduct # Multifunction Composite Gadget
echo 0x0100 > bcdDevice # v1.0.0
@timdetering
timdetering / Random_Dungeon_Design.md
Last active February 24, 2023 03:59
The Secret Workings of Jamis Buck's Dungeon Generator

Random Dungeon Design

The Secret Workings of Jamis Buck's Dungeon Generator

So you've tried my Dungeon Generator http://www.aarg.net/~minam/dungeon.cgi once or twice, and it's got you thinking. Perhaps you're a programmer and would like to incorporate similar features in a program of your own. Or maybe you're not a programmer, but would be interested in an overview of how this program works.

Either way, I've been asked how this random dungeon generator works many, many times, and I finally decided that, to save myself time, I'd just put up the description on a web page.

If you find this explanation useful, please let me know. Likewise, if you feel that I was too technical, or not technical enough, or too ambiguous, let me know that, too, and I can try and improve it.

@shmup
shmup / torrents.md
Last active April 11, 2024 10:03
transmission blocklist guide

Transmission Blocklist

The Transmission torrent client has an option to set a Blocklist, which helps protect you from getting caught and having the DMCA send a letter/email.

It's as simple as downloading and installing the latest client:

Quick Reference for SDL2
========================
Includes both prototypes and short examples of using the call.
int SDL_Init(Uint32 flags)
SDL_Init(SDL_INIT_VIDEO|SDL_INIT_AUDIO);
void SDL_Quit(void)
atexit(SDL_Quit);
const char* SDL_GetHint(const char* name)
@OrangeTide
OrangeTide / cube_vbo.c
Created April 25, 2015 04:56
Drawing a cube in OpenGL using VBOs. (required SDL2)
/* cube_vbo.c - demo of drawing a cube in GL using VBOs.
*
* PUBLIC DOMAIN - Jon Mayo - April 24, 2015
*
* Requires SDL2
*
* To build:
* gcc -Wall -W -o cube_vbo cube_vbo.c `pkg-config --libs --cflags sdl2 gl`
*
*/