Skip to content

Instantly share code, notes, and snippets.

View toastal's full-sized avatar
🚪
Offer alt mirror so I can delete my account w/ MS GitHub finally

toastal

🚪
Offer alt mirror so I can delete my account w/ MS GitHub finally
View GitHub Profile
@toastal
toastal / .xmobarrc.hs
Last active March 21, 2019 08:50
xmonad confs
-- vim: noai ts=2 sw=2
-- vim: filetype=haskell
Config
{ font = "xft:Terminus:size=16:regular:antialias=false"
, additionalFonts =
[ "xft:TerminessTTF Nerd Font:size=18:medium:antialias=true"
, "xft:Fixedsys Excelsior:size=22:regular:antialias=false"
]
, border = NoBorder
@toastal
toastal / cards.elm
Last active December 31, 2016 10:16
Elm Card Stuff
import Html exposing (text)
import List.Extra as List
{-
List.andThen : (a -> List b) -> List a -> List b
List.andThen =
List.concatMap
List.lift2 : (a -> b -> c) -> List a -> List b -> List c
List.lift2 f la lb =
@toastal
toastal / Main.elm
Created December 6, 2016 22:46
Elm URL Parsing Playaround
module Main exposing (..)
{-| elm-package install elm-lang/navigation evancz/url-parser
-}
import Html exposing (Html, caption, div, table, tbody, td, text, th, thead, tr)
import Navigation exposing (Location)
import String
import UrlParser exposing (Parser, (</>), map, oneOf, s, int, string, top, parseHash)
# set -U fish_user_paths $fish_user_paths /sbin /usr/sbin /usr/local/sbin ~/bin ~/.node/bin ~/.local/bin
set -U fish_key_bindings fish_vi_key_bindings
set -x TERM xterm-256color
set -x VISUAL nvim
set -x EDITOR nvim
set -x NVIM_TUI_ENABLE_TRUE_COLOR 1
set -x GITHUB_AUTH_TOKEN 2f26b867e07c04b22f6b6e95c78288b86d6fe636
set -x GDK_DPI_SCALE 1.25
# fish git prompt
module OnFail exposing (onFail)
onFail : (a -> Maybe b) -> (a -> b) -> a -> b
onFail f g x =
case f x of
Just y ->
y
Nothing ->
@toastal
toastal / init.vim
Last active June 24, 2020 16:56
Nvim conf
" vim: noai ts=2 sw=2
set shell=/bin/fish
let g:EditorConfig_exec_path = '/bin/editorconfig'
if has('mouse') | set mouse=a | endif
"set relativenumber
set number
set scrolloff=4
set inccommand=split
-- TODO: nil check the hell out of this
local https = require "ssl.https"
local ltn12 = require "ltn12"
local lub = require "lub"
local xml = require "xml"
local cookie = require "cookie"
function url_encode(str)

Debian Laptop Setup

What are we aiming for?

Debian unstable/sid, two SSDs in Btrfs RAID0, GRUB, Nvidia+Bumblebee, Openbox+Other DE stuff, HiDPI, some basic dev needs

Why is this special?
@toastal
toastal / ECMAScript2015-JSX-4-space.js
Last active October 18, 2021 07:59
Readability: DOM Functions v JSX; LiveScript v ECMAScript2015; 2 space v 4 space
// renderDeviceDetailsInfo : Device -> React.Node
const renderDeviceDetailsInfo = function renderDeviceDetailsInfo(device) {
const volCount = availableVolumes.reduce((acc, vol) =>
acc + 1 + (vol.subdirs ? vol.subdirs.length : 0)
, 0);
return (
<div className: "device-details-info">
{
[
(into [:dl]
(map #(vector %1 %2) (cycle [:dt :dd]) (flatten (vec (clojure.walk/stringify-keys {:test "me" :foo "bar"})))))
;=> [:dl [:dt "test"] [:dd "me"] [:dt "foo"] [:dd "bar"]]