Skip to content

Instantly share code, notes, and snippets.

Nix Flake MVP

Goals

  • To provide Nix repositories with an easy and standard way to reference other Nix repositories.

  • To allow such references to be queried and updated automatically.

  • To provide a replacement for nix-channel, NIX_PATH and Hydra

@stefansundin
stefansundin / download-slack-emoji.sh
Last active February 9, 2023 15:05
Download all of your Team's custom Slack emojis.
#!/bin/bash -eo pipefail
# Log in to Slack in a web browser and open the network tools to inspect the traffic.
# Filter the requests with "/api/" and pick one to inspect.
# You need the xoxc token from the request body, and a copy of the cookies. It is the "d" cookie that is important, but you can copy all of them. Make sure that the cookie value is percent encoded!
# Paste the values below.
# You need to have curl and jq installed.
# You can also get the xoxc token from localStorage. Run this in the JavaScript console:
# Object.entries(JSON.parse(localStorage.localConfig_v2)["teams"]).reduce((o,e) => Object.assign(o, { [e[1]["name"]]: e[1]["token"] }), {})
(defvar yas/temp-snippet nil
"Content of the temporary snippet")
(defun yas/save-temp-snippet ()
"Saves the temporary snippet"
(interactive)
(setq yas/temp-snippet
(buffer-substring (region-beginning) (region-end))))
(defun yas/expand-temp-snippet ()