Skip to content

Instantly share code, notes, and snippets.

@munificent
munificent / generate.c
Last active May 1, 2024 20:06
A random dungeon generator that fits on a business card
#include <time.h> // Robert Nystrom
#include <stdio.h> // @munificentbob
#include <stdlib.h> // for Ginny
#define r return // 2008-2019
#define l(a, b, c, d) for (i y=a;y\
<b; y++) for (int x = c; x < d; x++)
typedef int i;const i H=40;const i W
=80;i m[40][80];i g(i x){r rand()%x;
}void cave(i s){i w=g(10)+5;i h=g(6)
+3;i t=g(W-w-2)+1;i u=g(H-h-2)+1;l(u
@Blaradox
Blaradox / brightnessControl.sh
Created September 23, 2018 03:47
Notifications for brightness and volume, using dunstify
#!/usr/bin/env bash
# You can call this script like this:
# $ ./brightnessControl.sh up
# $ ./brightnessControl.sh down
# Script inspired by these wonderful people:
# https://github.com/dastorm/volume-notification-dunst/blob/master/volume.sh
# https://gist.github.com/sebastiencs/5d7227f388d93374cebdf72e783fbd6a
@tadly
tadly / rofi-emoji.sh
Last active April 14, 2024 01:12
Rofi emoji picker
#!/usr/bin/env bash
#
# Use rofi to pick emoji because that's what this
# century is about apparently...
#
# Requirements:
# rofi, xsel, xdotool, curl, xmllint
#
# Usage:
# 1. Download all emoji
@westcripp
westcripp / PitchBlack Themed Applications List
Last active December 20, 2020 14:42
PitchBlack Themed Applications List
NOTE: If you have received new app update, than you should reapply recently updated app overlay to fix conflicts and force close issues
What’s themed ?
• Android systemUI and FW base
• NavigationBar
• Signal bars (Nougat only)
• Custom switch toggles
• Overall system animations (Nougat only)
• Settings
• AOSP Dialer
@abn
abn / 00-lenovo-x1-5th-gen-thinkfan-setup.md
Last active January 30, 2024 19:31
Fedora thinkfan configuration for Lenovo X1 Carbon (5th Gen)

Thinkfan Configuration Notes

This are notes for configuration thinkfan for Fedora. This configuration procedure was followed on a Lenovo Thinkpad X1 Carbon (5th Gen) running Fedora 25.

Non standard (default) configuration was required for this machine as the default sensors are not available. Eg: /proc/acpi/ibm/thermal does not exist for this model.

An annoted configuration file has been included below. However, there is no guarentee that this will work as-is on every machine.

Installation

dnf -y install thinkfan
@dszakallas
dszakallas / readme.md
Last active September 6, 2017 07:55
Modern JavaScripting a MIDI controller

Modern JavaScripting a MIDI controller

Abstract: Blogpost summarizing the challenges of creating a flexible and customizable MIDI controller mapping for Mixxx targeting multiple Novation Launchpad grid controllers.

Keywords: JavaScript, MIDI, Mixxx, ES6 modules, Babel, Flow

I own two Novation Launchpads. The most iconic use-cases of this cool grid controller is launching samples. Launchpad cover videos are very popular on YouTube. These are done by slicing up the songs, and playing back live, spiced with some flashy visual effects.

You can also use launchpads for DJing. While being fit for a handful of things: cueing samples, beatjumping and looping, etc.; the Launchpad have neither a jogwheel nor any rotary controls or faders, so it falls short on functions like scratching or crossfading. Thus, it’s best to use as companion to your other DJ gear.

@mrkgnao
mrkgnao / IosevkaConfigGen.hs
Last active November 8, 2022 18:28
Render Iosevka ligatures to Private Use Area glyphs, for Emacs
{-# LANGUAGE RecordWildCards, Arrows #-}
import Numeric
import Data.Char
import Control.Monad
import Data.Monoid ((<>))
import Data.List (nub, sort, reverse)
data RepeatBounds = RB
@domenkozar
domenkozar / nixos-on-dell-9560.org
Last active August 25, 2023 17:07 — forked from grahamc/nixos-on-dell-9560.org
NixOS on a Dell 15" 9560 with the 4K screen.

WeeChat Screenshot

Here I will show you how to create a bar very similar to the nicklist bar, but instead of showing nickname, it will show znc commands, whenever you click on a command, weechat will send a "help the_command_you_just_clicked" and insert the name of the command in the input bar, then enter any arguments required to the command and press enter.

You will need the following script

  1. text_item.py

Let's create the bar