Skip to content

Instantly share code, notes, and snippets.

View witt3rd's full-sized avatar
⌨️
coding

Donald Thompson witt3rd

⌨️
coding
View GitHub Profile
@witt3rd
witt3rd / random_double.idr
Created September 30, 2020 08:30
Random Double from Haskell in Idris
module RandomDouble
import Data.Bits
import Data.Vect
import Effects
import Effect.StdIO
import Effect.Random
-- 2^53 as an Integer
twoTo53 : Integer
@witt3rd
witt3rd / idris_cookbook.md
Last active October 8, 2020 10:16
Idris code snippets

Idris Cookbook

From Haskell

newtype

newtype WorldM a = WorldM { asT :: WorldT a }
@witt3rd
witt3rd / nix.md
Last active September 17, 2020 18:20
adventures in nix

nix

Install

macOS

Follow the recommended approach to prepare for the standard Linux install (below).

Linux / WSL

@witt3rd
witt3rd / idris_tdd_reading_group.md
Last active October 13, 2020 21:54
Type-Driven Development with Idris: Reading Group Questions and Challenges

Type-Driven Development with Idris: Reading Group Questions and Challenges

Chapter 3. Interactive development with types

  • Functions in Idris are defined by collections of pattern-matching equations.
  • Patterns arise from the constructors of a data type.
  1. Describe "type declaration", "type definition", "equation", "expression"
  2. Are type declarations required? When (not)?
  3. What is referential transparency?
  4. Can pattern matching match a specific value?
@witt3rd
witt3rd / rename_a_mac.md
Created September 13, 2020 12:36
really rename a mac
export MY_NAME="MyName"
sudo scutil --set ComputerName "$MY_NAME" && \
sudo scutil --set HostName "$MY_NAME" && \
sudo scutil --set LocalHostName "$MY_NAME" && \
sudo defaults write /Library/Preferences/SystemConfiguration/com.apple.smb.server NetBIOSName -string "$MY_NAME"
@witt3rd
witt3rd / Idris.md
Last active September 13, 2020 16:02
Idris and Idris2 setup

Idris

Install

macOS

brew install idris
@witt3rd
witt3rd / Neovim.md
Last active September 13, 2020 16:02
Neovim setup

Neovim

brew install neovim
mkdir ~/.config/nvim
touch ~/.config/nvim/init.vim
cd ~/.config/nvim
curl -fLo ~/.config/nvim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim

You should now have plug.vim in your autoload directory so it will load of on start.

@witt3rd
witt3rd / haskell.md
Last active September 13, 2020 16:39
Haskell setup
@witt3rd
witt3rd / live-coding-setup.md
Last active September 13, 2020 16:04
Live coding setup

Live Coding Setup

Here is a list of tools and gear I use to make YouTube videos for coding. I will try to keep it up-to-date as I evolve and get better at producing content. Leave a comment, if you have suggestions!

Windows 10

I use both Mac and Windows, but I am currently doing all the capture and production on Windows. For coding, I find the Linux shell much better than PowerShell or the Windows Command Prompt.

Development Environment

@witt3rd
witt3rd / youtube-dl.md
Last active October 25, 2020 14:09
YouTube Download Recipes

youtube-dl Recipes

brew install youtube-dl ffmpeg

Download video or playlist

youtube-dl -f best 'http://www.youtube.com/watch?v=P9pzm5b6FFY'