Skip to content

Instantly share code, notes, and snippets.

&__color-span {
display: inline-block;
padding: 0 2px;
position: relative;
font-weight: var(--TYPOGRAPHY__font-weight-bold);
& > * {
position: relative;
}
@jda0
jda0 / object.js
Created February 25, 2021 21:30
Set operations for objects (as opposed to iterables)
/**
* Returns the difference of the first and other objects provided.
* @param {any} x
* @param {any} ys
*/
export const difference = (x, ...ys) =>
Object.fromEntries(
Object.entries(x).filter(([k, v]) => !ys.some(y => y[k] === v)),
);
#
# This shell prompt config file was created by promptline.vim
#
function __promptline_host {
local only_if_ssh="0"
if [ $only_if_ssh -eq 0 -o -n "${SSH_CLIENT}" ]; then
if [[ -n ${ZSH_VERSION-} ]]; then print %m; elif [[ -n ${FISH_VERSION-} ]]; then hostname -s; else printf "%s" \\h; fi
fi
}
@jda0
jda0 / .bashrc
Created December 27, 2019 19:39
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
# If not running interactively, don't do anything
case $- in
*i*) ;;
*) return;;
esac
@jda0
jda0 / .bashrc
Created December 27, 2019 19:39
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
# If not running interactively, don't do anything
case $- in
*i*) ;;
*) return;;
esac
{
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true,
"source.fixAll.pylint": true,
},
"editor.dragAndDrop": true,
"editor.fontFamily": "Jetbrains Mono, Menlo, Monaco, 'Courier New', monospace",
"editor.fontLigatures": true,
"editor.fontSize": 13,
"editor.letterSpacing": 0.25,
@jda0
jda0 / setup.ps1
Last active February 14, 2019 12:39
Setup new PC (Chocolatey)
Write-Host "Cannot automatically install LastPass, Ubuntu, Spotify from Windows Store."
Write-Host "Installing Google Drive, Hyper, Skyfonts, Visual Studio Code from Chocolatey."
Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
choco install -y google-drive-file-stream hyper skyfonts vscode
Write-Host "Done. Check above for errors."
Preliminary notes:
1. Where necessary the following function was used to convert parser output to
canonical form (to detect equivalent syntax trees up to associativity of
statement composition):
tx :: Stm -> Stm
tx (Comp (Comp a b) c) = tx (Comp a (Comp b c))
tx (Comp a b) = (Comp (tx a) (tx b))
tx (If b s1 s2) = (If b (tx s1) (tx s2))
module Proc where
import Prelude hiding (Num, and, lookup, map)
import Control.Applicative hiding (empty)
import Control.Arrow (second)
import Control.Monad
import Data.Functor.Identity (Identity)
import Data.Map.Lazy
import Data.Maybe