Skip to content

Instantly share code, notes, and snippets.

@micrub
micrub / xmonad-default-key-bindings.md
Last active March 28, 2024 15:06
Xmonad default key bindings

xmonad default key bindings

Action key bindings

Key binding Action
mod - shift - slash Run xmessage with a summary of the default keybindings (useful for beginners)
mod - shift - return Launch terminal
mod - p Launch dmenu
mod - shift - p Launch gmrun
@ykomatsu
ykomatsu / nix-macos.md
Created October 22, 2017 12:50
Installing Nix on macOS in single-user mode
@CMCDragonkai
CMCDragonkai / nix_fetching_functions.md
Last active February 24, 2023 09:34
Nix Fetching Functions #nix

Found all these from nix-repl. Use builtins.fetchTarball for nixpkgs pinning!

builtins.fetchurl
builtins.fetchTarball
pkgs.fetchFromBitbucket
pkgs.fetchFromGitHub
pkgs.fetchFromGitLab
pkgs.fetchFromRepoOrCz
pkgs.fetchFromSavannah
@joepie91
joepie91 / .md
Last active May 8, 2024 07:35
A *complete* listing of operators in Nix, and their predence.

Lower precedence means a stronger binding; ie. this list is sorted from strongest to weakest binding, and in the case of equal precedence between two operators, the associativity decides the binding.

Prec Abbreviation Example Assoc Description
1 SELECT e . attrpath [or def] none Select attribute denoted by the attribute path attrpath from set e. (An attribute path is a dot-separated list of attribute names.) If the attribute doesn’t exist, return default if provided, otherwise abort evaluation.
2 APP e1 e2 left Call function e1 with argument e2.
3 NEG -e none Numeric negation.
4 HAS_ATTR e ? attrpath none Test whether set e contains the attribute denoted by attrpath; return true or false.
5 CONCAT e1 ++ e2 right List concatenation.
6 MUL e1 * e2 le
@oeb25
oeb25 / default.nix
Last active February 19, 2021 14:35
Elixir/Phoenix Nix and script configuration
with import <nixpkgs> {};
stdenv.mkDerivation rec {
name = "env";
env = buildEnv { name = name; paths = buildInputs; };
buildInputs = [
yarn
nodejs-6_x
elixir
postgresql96
@chrismccord
chrismccord / upgrade.md
Last active April 7, 2023 12:03
Phoenix 1.2.x to 1.3.0 Upgrade Instructions

If you want a run-down of the 1.3 changes and the design decisions behidn those changes, check out the LonestarElixir Phoenix 1.3 keynote: https://www.youtube.com/watch?v=tMO28ar0lW8

To use the new phx.new project generator, you can install the archive with the following command:

$ mix archive.install https://github.com/phoenixframework/archives/raw/master/phx_new.ez

Bump your phoenix dep

Phoenix v1.3.0 is a backwards compatible release with v1.2.x. To upgrade your existing 1.2.x project, simply bump your phoenix dependency in mix.exs:

@expede
expede / witchcraft_monadic_do.ex
Last active May 20, 2020 15:54
Witchcraft Monadic Do Notation Primer
# ========
# NOTATION
# ========
# Control.Monad (Haskell) Bind
>>=
# Witchcraft.Chain.bind (Elixir)
>>>
@danidiaz
danidiaz / netrw.txt
Created October 7, 2016 20:57
Vim's netrw commands.
--- ----------------- ----
Map Quick Explanation Link
--- ----------------- ----
< <F1> Causes Netrw to issue help
<cr> Netrw will enter the directory or read the file |netrw-cr|
<del> Netrw will attempt to remove the file/directory |netrw-del|
<c-h> Edit file hiding list |netrw-ctrl-h|
<c-l> Causes Netrw to refresh the directory listing |netrw-ctrl-l|
<c-r> Browse using a gvim server |netrw-ctrl-r|
<c-tab> Shrink/expand a netrw/explore window |netrw-c-tab|
@datakurre
datakurre / configuration.nix
Last active March 1, 2021 15:19
Bootable NixOS USB stick for kiosk or demo usage
{ config, lib, pkgs, ... }:
with lib;
{
imports = [
# ISO image
<nixpkgs/nixos/modules/installer/cd-dvd/iso-image.nix>
# Hardware support similar to installer Live CD
<nixpkgs/nixos/modules/profiles/all-hardware.nix>
@joepie91
joepie91 / .md
Last active August 11, 2022 18:27
Nix package development notes

Some notes for tricky things I've run into while packaging things for Nix...

Searching through package expressions in the master branch of nixpkgs

There is a code search available here. It's considerably more useful and accurate than GitHub's search.

Creating your own package 'repository'

This article explains that.