Skip to content

Instantly share code, notes, and snippets.

@andys8
andys8 / brick.md
Last active Apr 22, 2020
brick (haskell)
View brick.md

FP Session Brick

Demo

  • brick-attr-demo
  • brick-border-demo
  • brick-form-demo
  • void-space-exe (in repo)
  • tetris
  • git-brunch
View mvg.sh
#!/bin/bash
# Request of <https://www.mvg.de/dienste/verbindungen.html>
set -eu pipefail
url="https://www.mvg.de/api/fahrinfo/routing/?fromStation=de:09162:2&toStation=de:09179:6180&transportTypeBus=false&transportTypeUnderground=false&transportTypeBoat=false&transportTypeTram=false&transportTypeCable=false&changeLimit=0&sapTickets=true"
json=$(curl -s "$url" || '')
if [[ $json == "" ]]; then
echo "$(tput setaf 3)Failed$(tput sgr 0)"
exit 1
@andys8
andys8 / haskell.yml
Created Feb 4, 2020
Haskell CI (Github Actions)
View haskell.yml
name: Haskell CI
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/cache@v1
View vimtutor.md

Vim Tutor

What I learned by vimtutor.

TL;DR

Skip this. Use vimtutor instead.

General usage

View i3config
# 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!
View gist:938b19bb470f187071e8968f9dfd5c49
(<$>), which lifts a single-argument function into a Functor
(<*>), which chains a multi-argument function through an Applicative
(=<<), which binds a function that enters a Monad onto an existing computation
@andys8
andys8 / keybindings.json
Last active Jul 16, 2018
VS Code Keybindings
View keybindings.json
[
{
"key": "ctrl+shift+s",
"command": "workbench.action.files.saveAll"
},
{
"key": "shift+enter",
"command": "extension.aceJump",
},
{
@andys8
andys8 / gist:0270b4c7e4bdc6dc0652755aaba6900c
Created Apr 24, 2018
How to build and flash QMK with DZ60 and Docker
View gist:0270b4c7e4bdc6dc0652755aaba6900c
# press space + b and connect the usb port
# build
docker run -e keymap=iso_vim_arrow -e keyboard=dz60 --rm -v $('pwd'):/qmk:rw edasque/qmk_firmware
# flash
sudo dfu-programmer atmega32u4 erase --force
sudo dfu-programmer atmega32u4 flash dz60_iso_vim_arrow.hex
sudo dfu-programmer atmega32u4 reset
@andys8
andys8 / fantasyland_spec_cheatsheet.md
Created Aug 6, 2017
A cheatsheet to have the fantasy land algebraic specification at a glance
View fantasyland_spec_cheatsheet.md

Fantasy Land Specification Cheatsheet

Algebras

Algebra Methods
Functor map
Apply ap, map
Applicative of, ap, map
Chain chain, ap, map