Skip to content

Instantly share code, notes, and snippets.

View cararemixed's full-sized avatar
🏳️‍🌈

Cara Mitchell cararemixed

🏳️‍🌈
View GitHub Profile
#
# wm independent hotkeys
#
# terminal emulator
super + Return
st
# program launcher
super + space
@cararemixed
cararemixed / config
Created March 6, 2018 17:43
i3 config
# This file has been auto-generated by i3-config-wizard(1).
# It will not be overwritten, so edit it as you like.
#
# Should you change your keyboard layout some time, delete
# this file and re-run i3-config-wizard(1).
#
# i3 config file (v4)
#
# Please see http://i3wm.org/docs/userguide.html for a complete reference!
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>author</key>
<string>Brian Mitchell</string>
<key>name</key>
<string>Monochromatic</string>
<key>settings</key>
<array>
@cararemixed
cararemixed / aseq.fs
Created October 19, 2017 03:36
Test script for Continuous IDE bug with recursive generic types
type AsyncSeq<'a> = Async<AsyncInner<'a>>
and AsyncInner<'a> =
| AsyncSeqNil
| AsyncSeqCons of 'a * AsyncSeq<'a>
let rec fold<'a, 'b> (f:'b -> 'a -> 'b) (s:'b) (xs:AsyncSeq<'a>) : Async<'b> = async {
let! x = xs
match x with
| AsyncSeqNil -> return s
@cararemixed
cararemixed / deriv.erl
Last active July 30, 2019 00:55
Parsing with derivatives in Erlang
-module(deriv).
-compile([export_all]).
nullable({rep, _}) -> true;
nullable({alt, Alts}) -> lists:any(fun nullable/1, Alts);
nullable(L) when is_list(L) -> lists:all(fun nullable/1, L);
nullable(_) -> false.
d(_, empty) -> empty;
d(_, []) -> empty;
18.828427654877792 = 113176610252/6010943257
18.828427654877792 = 11644626562/618459851
18.828427654877792 = 1206388604803/64072721680
18.828427654877792 = 1351199027/71763774
18.828427654877792 = 1444300989908416/76708529059475
18.828427654877792 = 14697597531/780606740
18.828427654877792 = 1525114896090/81000650933
18.828427654877792 = 155558666430211/8261904248277
18.828427654877792 = 16070294714071/853512306425
18.828427654877792 = 17750568500/942753629
@cararemixed
cararemixed / rebar.config.script
Created September 21, 2015 22:12
Advanced rebar3 configuration loader
%% Add some helpful errors to our configuration loading script to
%% make troubleshooting common problems easier.
Consult = fun (Name) ->
rebar_api:debug("Consulting ~p", [Name]),
case file:consult(Name) of
{error, enoent} ->
rebar_api:error("Error: missing file ~s", [Name]),
erlang:halt(1);
{error, {Line, erl_parse, Problem}} ->
{ok, Bin} = file:read_file(Name),
-module(bench).
-compile(export_all).
init(_) ->
{ok, null}.
handle_call(ping, _, St) ->
{reply, pong, St}.
start() ->
@cararemixed
cararemixed / user.json
Created May 26, 2015 15:47
sublime config
{
"auto_complete": false,
"bold_folder_labels": true,
"caret_style": "phase",
"color_scheme": "Packages/User/SublimeLinter/monochromatic (SL).tmTheme",
"draw_centered": false,
"ensure_newline_at_eof_on_save": true,
"file_exclude_patterns":
[
"*.pyc",
@cararemixed
cararemixed / monochromatic.tmTheme
Created May 6, 2015 15:52
Monochromatic Theme
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>author</key>
<string>Brian Mitchell</string>
<key>name</key>
<string>Monochromatic</string>
<key>settings</key>
<array>