Skip to content

Instantly share code, notes, and snippets.

@s-macke
s-macke / AI-programming.md
Last active October 27, 2024 10:19
Vom Code zum Copiloten: Ein Blick auf das Neueste in der KI-Softwareentwicklung
@spencerpogo
spencerpogo / json2nix.py
Last active June 10, 2024 06:42
Converts JSON objects into nix (hackishly).
"""Converts JSON objects into nix (hackishly)."""
import sys
import json
INDENT = " " * 2
def strip_comments(t):
@samspills
samspills / howto.org
Last active August 18, 2024 17:26
Org-capture prompt for heading

How to prompt for a heading during org-capture

Background

I use one file as my org-mode daily driver. This file is called journal.org. It starts with a datetree, which is where I capture general notes, individual tasks, ideas, things to read, etc. etc. I have separate headings for other content, for example all of my projects are under a projects heading, further split by context. Roughly the file looks like this:

* 2021
** 2021-03 March
*** 2021-03-15 Monday
**** [2021-03-15 Mon 16:29] note title :tagA:tagB:
     - note content here ooooo
@norganna
norganna / README.md
Last active May 2, 2024 05:22
A slack bot to invite users from one channel to another.

Using:

Installing the script

Make a new directory and put the run.js script into it.

Run npm in that same directory to install the slack web-api module:

npm install @slack/web-api
@yorickvP
yorickvP / wl-clipboard.el
Created March 14, 2019 11:02
teach emacs to use wl-copy
(setq wl-copy-process nil)
(defun wl-copy (text)
(setq wl-copy-process (make-process :name "wl-copy"
:buffer nil
:command '("wl-copy" "-f" "-n")
:connection-type 'pipe))
(process-send-string wl-copy-process text)
(process-send-eof wl-copy-process))
(defun wl-paste ()
(if (and wl-copy-process (process-live-p wl-copy-process))
@krisleech
krisleech / renew-gpgkey.md
Last active November 13, 2024 19:10
Renew Expired GPG key

Renew GPG key

Given that your key has expired.

$ gpg --list-keys
$ gpg --edit-key KEYID

Use the expire command to set a new expire date:

@BrynM
BrynM / README.md
Last active October 24, 2024 15:42
Steam Workshop Subscriptions Scraper

Steam Workshop Subscriptions Scraper

Description

This is just something I whipped up to dump a listing of my own subscriptions for a particular game. Unfortunately Vavle/Steam doesn't do such a thing natively and I had to get really creative for my list of several hundred items so I could share with a friend.

So I made this little monstrosity over an evening.

Use

@garoto
garoto / mpvhistory.lua
Last active November 9, 2024 22:42
Simple media logger Lua script for mpv
-- Not my code: originally from https://redd.it/3t6s7k (author deleted; failed to ask for permission).
-- Only tested on Windows. Date is set to dd/mmm/yy and time to machine-wide format.
-- Save as "mpvhistory.lua" in your mpv scripts dir. Log will be saved to mpv default config directory.
-- Make sure to leave a comment if you make any improvements/changes to the script!
local HISTFILE = (os.getenv('APPDATA') or os.getenv('HOME')..'/.config')..'/mpv/mpvhistory.log';
mp.register_event('file-loaded', function()
local title, logfile;
@robertpainsi
robertpainsi / commit-message-guidelines.md
Last active November 16, 2024 11:48
Commit message guidelines

Commit Message Guidelines

Short (72 chars or less) summary

More detailed explanatory text. Wrap it to 72 characters. The blank
line separating the summary from the body is critical (unless you omit
the body entirely).

Write your commit message in the imperative: "Fix bug" and not "Fixed
bug" or "Fixes bug." This convention matches up with commit messages
@jatcwang
jatcwang / gist:ae3b7019f219b8cdc6798329108c9aee
Created February 2, 2017 23:44
List of all setxkbmap configuration options (including models/layout/etc)
! model
pc101 Generic 101-key PC
pc102 Generic 102-key (Intl) PC
pc104 Generic 104-key PC
pc105 Generic 105-key (Intl) PC
dell101 Dell 101-key PC
latitude Dell Latitude series laptop
dellm65 Dell Precision M65
everex Everex STEPnote
flexpro Keytronic FlexPro