Skip to content

Instantly share code, notes, and snippets.

View croissong's full-sized avatar

Jan Möller croissong

View GitHub Profile
@s-macke
s-macke / darmstadt_links.md
Last active June 4, 2023 13:31
Darmstadt Vorlesung - 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 August 23, 2024 16:04
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 July 19, 2024 21:19
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 April 6, 2024 11:53
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 August 14, 2024 01:56
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
@hyOzd
hyOzd / delete-file-and-buffer.el
Created July 21, 2015 11:55
emacs delete current file and close the buffer
;; based on http://emacsredux.com/blog/2013/04/03/delete-file-and-buffer/
(defun delete-file-and-buffer ()
"Kill the current buffer and deletes the file it is visiting."
(interactive)
(let ((filename (buffer-file-name)))
(if filename
(if (y-or-n-p (concat "Do you really want to delete file " filename " ?"))
(progn
(delete-file filename)
(message "Deleted file %s." filename)