Skip to content

Instantly share code, notes, and snippets.

View ashton314's full-sized avatar
👨‍💻
Expanding ((λ (x) (x x)) (λ (y) (y y)))

Ashton Wiersdorf ashton314

👨‍💻
Expanding ((λ (x) (x x)) (λ (y) (y y)))
View GitHub Profile
@blackode
blackode / .formatter.exs
Last active June 11, 2020 17:39
Elixir codebase formatter
# project_root/.formatter.exs
[
# functions to let allow the no parens like def print value
locals_without_parens: [hello: 2, get_user: 1, addtion: *],
# files to format
inputs: ["mix.exs", "{config,lib,test}/**/*.{ex,exs}"],
#lang racket
(require (rename-in racket/base [+ r:+]))
(provide +)
(define (join e1 e2)
(cond
[(and (number? e1) (number? e2))
number?]
[(and (number? e1) (symbol? e2))
@eddieh
eddieh / .mbsyncrc
Last active January 31, 2022 17:26
mbsync (isync) configuration for iCloud email account
# -*- mode: conf; tab-width: 4; -*-
## Passwords
# When using iCloud it is best to create an app-specific password
#
# https://support.apple.com/en-us/HT204397
#
# Store application specific passwords on macOS with
@MikaAK
MikaAK / big-o.md
Created April 25, 2022 18:28 — forked from PJUllrich/big-o.md
Big-O Time Complexities for Elixir Data Structures

Big-O Time Complexities for Elixir data structures

Map [1]

Operation Time Complexity
Access O(log n)
Search O(log n)
Insertion O(n) for < 32 elements, O(log n) for >= 32 elements [2]
Deletion O(n) for < 32 elements, O(log n) for >= 32 elements
@AllenDang
AllenDang / gccemacs.md
Last active August 15, 2023 15:45
Build gccemacs on MacOS catalina with gcc 10 installed by homebrew.
@dumbbell
dumbbell / bootstrapping-rust-freebsd-aarch64.md
Last active September 15, 2023 12:17
Bootstrapping Rust and Cargo on FreeBSD/aarch64

Bootstrapping Rust and Cargo on FreeBSD/aarch64

At the time of this writing, Rust and Cargo are available on FreeBSD/amd64 and FreeBSD/i386 only, whether it is from rustup or from the FreeBSD ports tree. Here is how I could bootstrap Rust and Cargo for FreeBSD/aarch64 from FreeBSD/amd64.

Base system for the target

To be able to cross-compile anything, you need a userland for the target.

From a release

@shakna-israel
shakna-israel / LetsDestroyC.md
Created January 30, 2020 03:50
Let's Destroy C

Let's Destroy C

I have a pet project I work on, every now and then. CNoEvil.

The concept is simple enough.

What if, for a moment, we forgot all the rules we know. That we ignore every good idea, and accept all the terrible ones. That nothing is off limits. Can we turn C into a new language? Can we do what Lisp and Forth let the over-eager programmer do, but in C?


;; A space invaders game in Racket
;; Copyright (c) 2020 Alex Harsányi (AlexHarsanyi@gmail.com)
;; Permission is hereby granted, free of charge, to any person obtaining a
;; copy of this software and associated documentation files (the "Software"),
;; to deal in the Software without restriction, including without limitation
;; the rights to use, copy, modify, merge, publish, distribute, sublicense,
;; and/or sell copies of the Software, and to permit persons to whom the
;; Software is furnished to do so, subject to the following conditions:
@tekin
tekin / .gitattributes
Last active February 23, 2024 16:46
An example .gitattributes file that will configure custom hunk header patterns for some common languages and file formats. See https://tekin.co.uk/2020/10/better-git-diff-output-for-ruby-python-elixir-and-more for more details.
# Stick this in your home directory and point your Global Git config at it by running:
#
# $ git config --global core.attributesfile ~/.gitattributes
#
# See https://tekin.co.uk/2020/10/better-git-diff-output-for-ruby-python-elixir-and-more for more details
*.c diff=cpp
*.h diff=cpp
*.c++ diff=cpp
*.h++ diff=cpp
@aphyr
aphyr / minikanren.pl
Created October 12, 2020 22:10
Minikanren in Lisp in Prolog
:- use_module(library(pairs)).
:- use_module(library(reif)).
not_in_list(K, L) :-
if_((L = []),
true,
([X | More] = L,
dif(K, X),
not_in_list(K, More))).