Skip to content

Instantly share code, notes, and snippets.

@seisvelas
seisvelas / fib.c
Last active December 10, 2018 20:13
Learnin' C
#include <stdlib.h>
int main(void) {
int edi = 5; // nth fib num
int ebx = 0;
int eax = 1;
int edx; // tmp
start_loop:
--edi;
@Gabriella439
Gabriella439 / package.dhall
Created April 7, 2018 02:45
The Cabal file format encoded as a Dhall type
let Version = ∀(Version : Type) → ∀(v : Text → Version) → Version
in let VersionRange =
∀(VersionRange : Type)
→ ∀(anyVersion : VersionRange)
→ ∀(noVersion : VersionRange)
→ ∀(thisVersion : Version → VersionRange)
→ ∀(notThisVersion : Version → VersionRange)
→ ∀(laterVersion : Version → VersionRange)
→ ∀(earlierVersion : Version → VersionRange)
@tubaterry
tubaterry / fingerguns.zsh-theme
Last active November 30, 2021 03:49
ZSH prompt with finger guns 👉 😎 👉 (requires emoji support)
# Don't forget to set COMPLETION_WAITING_DOTS=false in your .zshrc - it doesn't always play nice with multiline prompts
# Troubleshooting breadcrumbs:
# Prompt design: http://zsh.sourceforge.net/Doc/Release/Prompt-Expansion.html#Prompt-Expansion
# Zsh Line Editor (zle): http://zsh.sourceforge.net/Doc/Release/Zsh-Line-Editor.html
#Broken down into its component pieces because I was tired of looking at a nearly incomprehensible string
FG_USER_BADGE=$'%{$fg_bold[green]%}%n@%m%{$reset_color%}'
FG_TIMESTAMP=$'%{$fg[blue]%}%D{[%X]}%{$reset_color%}'
FG_CWD_DISPLAY=$'%{$fg[white]%}[%~]%{$reset_color%}'
@YoEight
YoEight / Dyna.hs
Last active August 2, 2022 19:44
Computes Fibonacci number with a histomorphism -- correction: Actually it's a dynamorphism as it uses an anamorphism to generate intermediary step
data Cofree f a = a :< (f (Cofree f a))
-- Fix point
newtype Mu f = Mu { unMu :: f (Mu f) }
extract :: Cofree f a -> a
extract (a :< _) = a
-- catamorphism
cata :: Functor f => (f b -> b) -> Mu f -> b
@yanofsky
yanofsky / LICENSE
Last active June 5, 2024 21:51
A script to download all of a user's tweets into a csv
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