Skip to content

Instantly share code, notes, and snippets.

View dubiouscript's full-sized avatar

dubiouscript

  • ./
View GitHub Profile
#!/bin/sh
set -e
dest="/nix"
self="$(dirname "$0")"
nix="@nix@"
cacert="@cacert@"
@dubiouscript
dubiouscript / non-nixos-manpages.txt
Last active October 19, 2018 09:57
nixpackages man pages ? oh this works note
man /nix/store/5dmfv7annq8xsmb6nrg1bnxpffbbswfv-jq-1.5-man/share/man/man1/jq.1.gz
# https://github.com/NixOS/nixpkgs/issues/24717#Missing man pages for packages with multiple outputs
man less
/home/ubuntu/.nix-profile/bin/man: can't set the locale; make sure $LC_* and $LANG are correct
No manual entry for less
which man
@dubiouscript
dubiouscript / pnix-shell.sh
Created November 26, 2018 20:50 — forked from aherrmann/pnix-shell.sh
Fully persistent Nix shell
# This is free and unencumbered software released into the public domain.
# Anyone is free to copy, modify, publish, use, compile, sell, or
# distribute this software, either in source code form or as a compiled
# binary, for any purpose, commercial or non-commercial, and by any
# means.
# In jurisdictions that recognize copyright laws, the author or authors
# of this software dedicate any and all copyright interest in the
# software to the public domain. We make this dedication for the benefit
@dubiouscript
dubiouscript / curl.md
Created December 3, 2018 17:18 — forked from btoone/curl.md
A curl tutorial using GitHub's API

Introduction

An introduction to curl using GitHub's API.

The Basics

Makes a basic GET request to the specifed URI

curl https://api.github.com/users/caspyin
@dubiouscript
dubiouscript / grub.cfg
Created December 6, 2018 20:58 — forked from Pysis868/grub.cfg
My own configuration file for GRUB2 to boot various live distributions of Linux-based operating systems, along with some system tools. I tried to include a lot of sample configuration entries, even if I don't currently use them, so it may help others. Exceedingly long blog post: http://tehfishyblog.logdown.com/chips/306146-a-homemade-ultimate-bo…
# Config for GNU GRand Unified Bootloader (GRUB) (2)
# /boot/grub/grub.cfg
# or
# /boot/grub2/grub.cfg
# This grub.cfg file was created by Lance http://www.pendrivelinux.com
# Suggested Entries and the suggestor, if available, will also be noted.
# and then improved by Pysis.
with import <nixpkgs> {};
stdenv.mkDerivation rec {
name = "helio-workstation";
version = "e5b39bf9efa66d75d93b82c9bdc8abbeb509cd6b";
src = fetchFromGitHub {
owner = "helio-fm";
repo = "helio-workstation";
rev = "${version}";
with import {};
stdenv.mkDerivation rec {
name = "carla-${version}";
version = "1.9.12";
src = fetchFromGitHub {
owner = "falkTX";
repo = "Carla";
rev = "v${version}";

Virtual Midi Janko Keyboard

The good thing about language-related subreddits is you can always tell people there about your hello world project, and the good thing about medium sized subreddits is your post might even be noticed.

So let's talk about mine one.

What

@dubiouscript
dubiouscript / monochord.md
Created January 1, 2019 11:37
Monochord: implementing a musical tunings library

First at all, falsehoods programmers believe about musical tuning:

  • C♯ and D♭ are the same notes
  • C𝄪 and D are the same notes
  • Semitone is 100 cents wide
  • There's only 12 notes in the octave
    • There's only 24 notes
    • Okay, 31 notes
    • Come on, 72 notes per octave is enough for everybody
  • You're kidding, right?
@dubiouscript
dubiouscript / imperative-env.sh
Created January 7, 2019 13:57 — forked from danbst/imperative-env.sh
Imperative nix-env rewrite (so it becomes declarative)
#!/usr/bin/env bash
statefile=~/.config/nixpkgs/declarative
action="$1"
package="$2"
mkdir -p $(dirname "$statefile")
touch "$statefile"
function update {
envExpr=~/.config/nixpkgs/declarative-env.nix