Skip to content

Instantly share code, notes, and snippets.

@rougier
rougier / make-box.el
Last active June 11, 2024 18:35
Emacs: add borders around some part of a buffer
;;; make-box.el --- Box around part of a buffer -*- lexical-binding: t -*-
;; Copyright (C) 2024 Nicolas P. Rougier
;; Maintainer: Nicolas P. Rougier <Nicolas.Rougier@inria.fr>
;; Version: 0.1.0
;; Package-Requires: ((emacs "27.1"))
;; Keywords: convenience
;; This file is not part of GNU Emacs.
@KSneijders
KSneijders / aoe2de-hkp-format.md
Last active March 27, 2024 07:00
The new HKP hotkey file format explained

AoE2:DE HKP file format

Disclaimer

This is my first time working with HKI and HKP files so there might be mistakes in my assumptions.
That being said, the file format shown below definitely is correct.

Please place a comment below if you find any issues regarding these notes.


@xero
xero / miasma.Xcolors
Created June 5, 2023 19:10
miasma “fall” colorscheme
// ┏┏┓o┳━┓┓━┓┏┏┓┳━┓
// ┃┃┃┃┃━┫┗━┓┃┃┃┃━┫
// ┛ ┇┇┛ ┇━━┛┛ ┇┛ ┇
// miasma by xero (https://x-e.ro)
*.foreground: #c2c2b0
*.background: #222222
*.cursorColor: #5f875f
! black
*.color0: #222222
@emanuele6
emanuele6 / bspdeskjson2dot
Last active July 20, 2024 22:32
bspwm tree visualiser
#!/bin/sh --
# \
exec jq -Crf "$0" -- "$@"
def children:
objects |
.path as $p |
(.firstChild | objects | .path = $p + "/1"),
(.secondChild | objects | .path = $p + "/2") |
select(has("id"));
@InfoTeddy
InfoTeddy / fix_steam_screensaver.c
Created May 22, 2022 06:58
Linux Steam client screensaver issue workaround LD_PRELOAD library, while letting games disable screensaver
/* SPDX-License-Identifier: MIT */
/*
* On Linux, Steam periodically calls SDL_DisableScreenSaver() so your
* screensaver doesn't work with the Steam client open even if you aren't
* playing a game, as described in
* https://github.com/ValveSoftware/steam-for-linux/issues/5607 .
*
* To fix this, LD_PRELOAD a library that replaces SDL_DisableScreenSaver()
* with a no-op if the executable calling it is Steam, but otherwise let it
@confususs
confususs / loop_hero.nix
Created March 16, 2021 20:09
Add the following to your configuration.nix to be able to play Loop Hero on NixOS :).
# Below patches steam with the right libraries so you can play
# Loop Hero. Have fun!
nixpkgs.config.packageOverrides = pkgs: {
steam = pkgs.steam.override {
extraPkgs = pkgs: [
pkgs.openssl_1_1
pkgs.libnghttp2
pkgs.libidn2
pkgs.rtmpdump
pkgs.libpsl
@spacegangster
spacegangster / bem.cljc
Last active November 9, 2020 05:17
Add modifiers to CSS classes as in BEM naming (in Clojure)
(ns space-ui.bem
"Add modifiers to CSS classes as in BEM method.
See rationale here: http://getbem.com/naming/
For BEM with elements see: https://github.com/druids/ccn
Compared to CCN this gist supports maps."
(:require [clojure.string :as str]))
@KGOH
KGOH / convert.clj
Last active February 29, 2024 12:12
convert.clj -- babashka edn/json/yaml to edn/json/yaml converter
#!/usr/bin/env bb
;; convert.clj -- babashka edn/json/yaml to edn/json/yaml converter
;; Author: github.com/KGOH/
;; Source: gist.github.com/KGOH/50c0f66022fea2ac173518a143238058
;; Version: 2020.4
; Usage example:
; In Emacs: i.imgur.com/TIEDmga.mp4
; $ convert.clj edn <<< '{"foo": "bar"}'
; {:foo "bar"}
@rougier
rougier / rounded-box.el
Last active October 3, 2020 13:24
SVG Rounded box for Emacs
(require 'svg)
;; Rounded boxes using SVG:
;; This could be made into a function but size of text needs to be computed
(defun tag (text &optional foreground background font-size)
(let* ((font-size (or font-size 12))
;; The char-width ratio depends on the font family
(char-width (* font-size 0.58))
(char-height (+ font-size 1))
@xero
xero / _artisan_dreams.md
Last active June 5, 2023 20:35
artisan keycap wishlist

artisan keycap wishlist

sorted artist > sculpt then by colorway desire

daphy v2

duck flick
3rd eye ✨ third eye