Skip to content

Instantly share code, notes, and snippets.

View jespada's full-sized avatar

jespada jespada

View GitHub Profile
@xqm32
xqm32 / alacritty.md
Last active May 7, 2024 10:23
Automatically switch color theme for Alacritty on macOS

Original issue comment: alacritty/alacritty#5999 (comment)

Run the following command to clone themes:

mkdir -p ~/.config/alacritty/themes
git clone https://github.com/alacritty/alacritty-theme ~/.config/alacritty/themes

Add the following content to ~/.config/alacritty/alacritty.toml:

@Integralist
Integralist / Makefile
Created March 1, 2024 10:48
[Check if Makefile target is called with a required input arg] #Makefile #make
# Check that given variables are set and all have non-empty values,
# die with an error otherwise.
#
# PARAMS:
# 1. Variable name(s) to test.
# 2. (optional) Error message to print.
#
# EXAMPLE:
# @:$(call check_defined, ENV_REGION, you must set ENV_REGION=usc1|awsuse2)
#
@dltacube
dltacube / linux.nix
Created December 16, 2023 03:06
extract of my home-manager configuration
home = {
sessionPath = [ "${config.xdg.configHome}/emacs/bin" "${config.home.homeDirectory}/.emacs.d/bin" "${pkgs.emacs}/bin" "${pkgs.git}" ];
sessionVariables = {
DOOMDIR = "${config.xdg.configHome}/doom-config";
DOOMLOCALDIR = "${config.xdg.configHome}/doom-local";
#DOOMLOCALDIR = "${config.home.homeDirectory}/.emacs.d";
};
};
xdg = {
enable = true;
@toraritte
toraritte / nix_pin_version_of_individual_packages.md
Last active March 22, 2024 15:30
(work in progress) State of affairs on how to pin versions of individual Nix packages (or how to refer to a specific package version with Nix)

Yes, there are several ways to do this, but none of them are as direct and simple as git v2.1.2; htop v1.2.3 and come with a lot of caveats.

aside
Specifying versions for programming language packages are possible too, but that topic seems to be even messier. The most promising standardization effort to date is [dream2nix][1].

0. Methods

That is, available at the time of this writing:

0.1 "versioned" attribute paths (if available)

@ssrihari
ssrihari / clojure-learning-list.md
Last active May 6, 2024 16:25
An opinionated list of excellent Clojure learning materials

An opinionated list of excellent Clojure learning materials

These resources (articles, books, and videos) are useful when you're starting to learn the language, or when you're learning a specific part of the language. This an opinionated list, no doubt. I've compiled this list from writing and teaching Clojure over the last 10 years.

  • 🔴 Mandatory (for both beginners and intermediates)
  • 🟩 For beginners
  • 🟨 For intermediates

Table of contents

  1. Getting into the language
@metasikander
metasikander / NIP-05_Simple_Guide.md
Last active February 13, 2024 20:09
A small minimal guide on setting up NIP-05 identifier on branle/nostr

This is a very basic guide, just to understand what's needed to set it up.
If you have any questions you can find me at https://nostr.com/8355095016fddbe31fcf1453b26f613553e9758cf2263e190eac8fd96a3d3de9

Prerequisite

Setup static file on server

Create a file that resolves to <domain>/.well-known/nostr.json, and fill it out like this (enter the name you want to use, and input your own public key, make sure its the HEX-key):

{
@jmatsushita
jmatsushita / README
Last active May 9, 2024 19:39
Setup nix, nix-darwin and home-manager from scratch on an M1 Macbook Pro
###
### [2023-06-19] UPDATE: Just tried to use my instructions again on a fresh install and it failed in a number of places.
###. Not sure if I'll update this gist (though I realise it seems to still have some traffic), but here's a list of
###. things to watch out for:
### - Check out the `nix-darwin` instructions, as they have changed.
### - There's a home manager gotcha https://github.com/nix-community/home-manager/issues/4026
###
# I found some good resources but they seem to do a bit too much (maybe from a time when there were more bugs).
# So here's a minimal Gist which worked for me as an install on a new M1 Pro.
@dmitri-lerko
dmitri-lerko / rules.yaml
Created October 25, 2021 14:57
Dynamic prometheus alert rules based on team label
# List of kube_*_labels metrics - not all of these are useful for alerting.
# kube_certificatesigningrequest_labels
kube_certificatesigningrequest_labels * on (certificatesigningrequest) group_right(label_team) (
...insert expression here
)
# kube_cronjob_labels
kube_cronjob_labels * on (cronjob, namespace) group_right(label_team) (
...insert expression here
)
#!/bin/sh
set -e
set -x
cd $HOME
rm -rf netstack.bare netstack
git clone --bare $HOME/gvisor netstack.bare
cd netstack.bare