Skip to content

Instantly share code, notes, and snippets.

@instinctive
instinctive / bashrc
Last active August 29, 2015 14:08
bash
export PS1="[ \t \h:\w ]\n\! \$ "
export PATH="$HOME/Library/Haskell/bin:$PATH"
@instinctive
instinctive / koan.py
Created November 1, 2014 23:18
Python koan (for beginners)
>>> a = [1,2,3]
>>> b = a
>>> a = a.append(9)
# what are the values of a and b?
@instinctive
instinctive / GCJ.hs
Created April 8, 2017 18:40
Haskell Code Jam Template
-- pragmas {{{
-- {-# LANGUAGE DataKinds #-}
-- {-# LANGUAGE FlexibleContexts #-}
-- {-# LANGUAGE TemplateHaskell #-}
-- }}}
module Main where
-- gcj imports {{{
import Control.Monad
import Data.Bifunctor
import Data.Bool
@instinctive
instinctive / CapsLockCtrlEscape.ahk
Last active September 19, 2017 02:40 — forked from sedm0784/CapsLockCtrlEscape.ahk
AutoHotkey script to map Caps Lock to Escape when it's pressed on its own, and Ctrl when used in combination with another key, à la Steve Losh. Adapted from the one that does something similar with the Ctrl Key on the Vim Tips Wiki (http://vim.wikia.com/wiki/Map_caps_lock_to_escape_in_Windows?oldid=32281). (With some extra key combos added by @r…
g_LastCtrlKeyDownTime := 0
g_AbortSendEsc := false
g_ControlRepeatDetected := false
*CapsLock::
if (g_ControlRepeatDetected)
{
return
}
$ cat 6.in
AABBBC
ADEFGC
HDEFGI
HJ4KKI
LJMNOI
LMMNO2
A * 40
B + 6
C - 5
>>> def foo(x): x.append(9)
...
>>> a = [1,2,3]
>>> a
[1, 2, 3]
>>> b = a
>>> b
[1, 2, 3]
>>> foo(a)
>>> a
> foo x = 9 : x
> a = [1,2,3]
> b = a
> foo a
[9,1,2,3]
> a
[1,2,3]
> b
[1,2,3]
@instinctive
instinctive / configuration.nix
Last active March 9, 2020 22:38
NixOS Configuration
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running ‘nixos-help’).
{ config, pkgs, ... }:
{
imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix
@instinctive
instinctive / Char.md
Last active February 26, 2020 06:12
Machine Build: Char

BIOS Update

My Gigabyte x570 Ultra shipped with Bios F5, which had no support for separate IOMMU groups.

I upgraded to F11, and set:

Tweaker > Advanced CPU Settings > SVM Mode > Enable
Settings > Miscellaneous > IOMMU > Enable
Settings > AMD CBS > ACS Enable > Enable

Settings > AMD CBS > Enable AER Cap > Enable