Skip to content

Instantly share code, notes, and snippets.

@chrismccord
chrismccord / upgrade.md
Last active September 5, 2025 05:27
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 October 14, 2024 07:25
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.

@CMCDragonkai
CMCDragonkai / nix_string_and_path_concatenation.md
Last active December 15, 2025 22:44
Nix: String and Path Concatenation #nix #nixos

Nix String and Path Concatenation

From Bas van Dijk:

To understand these things I would recommend using nix-repl:

$ nix-repl
Welcome to Nix version 1.11.2. Type :? for help.
@jpf
jpf / showoff.sh
Last active October 23, 2021 19:41
#! /usr/bin/env nix-shell
#! nix-shell -i bash -p curl -p xmlstarlet -p imagemagick -p jp2a -p lolcat
#
# showoff.sh:
# Demonstrate the capabilities of Nix by writing a gratuitously complex shell
# script that combines 5 different command line utilities together.
#
# Do the following to run this demo:
# If you don't have Nix yet, install it with this command:
# $ curl https://nixos.org/nix/install | sh
@martijnvermaat
martijnvermaat / nixos.md
Last active November 3, 2025 16:08
Installation of NixOS with encrypted root
@aaronlevin
aaronlevin / config.nix
Created April 21, 2016 10:49
Use Nix to build vim with +python support + custom python libraries
# I wanted to use ensime with vim, which requires vim + python + some python packages (websocket_client + sexpdata)
# unfortunately, nix would build vim with a python that didn't have access to my system libraries (for referential transperancy)
# so I needed to provide to `vim_configurable.nix` the right python to use *and* enable python, lua, etc. support.
# I also wanted to keep my `.vimrc` separate because some of the vim packages I use weren't available.
#
# install via: `nix-env -f '<nixpkgs>' -iA myCoolVim` or `nix-env -I nixpkgs=/path/to/your/nixpkgs -f '<nixpkgs>' -iA myCoolVim`
#
# out put of `vim --version` below.
{
@simonw
simonw / how-to.md
Last active December 19, 2025 10:46
How to create a tarball of a git repository using "git archive"