Skip to content

Instantly share code, notes, and snippets.

View dstcruz's full-sized avatar

Daniel Santa Cruz dstcruz

  • S&P Global
  • Denver, CO
View GitHub Profile
@machuu
machuu / WSL2_VPN_Workaround_Instructions.md
Last active April 18, 2024 23:13
Workaround for WSL2 network broken on VPN

Overview

Internet connection and DNS routing are broken from WSL2 instances, when some VPNs are active.

The root cause seems to be that WSL2 and the VPN use the same IP address block, and the VPN routing clobbers WSL2's network routing.

This problem is tracked in multiple microsoft/WSL issues including, but not limited to:

@ChrisPenner
ChrisPenner / Optics Cheatsheet.md
Last active April 12, 2024 14:24
Optics Cheatsheet

How to upgrade to Purescript 0.12

Before we begin, the type search in Pursuit is a great way to search for the functions you need.

Reset your tooling by deleting the bower_components/, .psci_modules/, .pulp-cache/, .psc-package/ and output/ folders. Then run psc-package build --only-dependencies.

Import changes and effects

Using sed or your other favourite global replace tool to search and replace all occurences in the list

Applied Functional Programming with Scala - Notes

Copyright © 2016-2018 Fantasyland Institute of Learning. All rights reserved.

1. Mastering Functions

A function is a mapping from one set, called a domain, to another set, called the codomain. A function associates every element in the domain with exactly one element in the codomain. In Scala, both domain and codomain are types.

val square : Int => Int = x => x * x
@tanyuan
tanyuan / smart-caps-lock.md
Last active April 24, 2024 15:22
Smart Caps Lock: Remap Caps Lock to Control AND Escape

Smart Caps Lock: Remap to Control AND Escape (Linux, Mac, Windows)

Caps Lock 變成智慧的 Control 以及 Escape

  • 單獨輕按一下就是 Escape
  • 若按下時同時按著其他鍵,就會是 Control

這應該是 Vim 和 Emacs 的最佳解了!(Emacs? Bash 的快捷鍵就是 Emacs 系列的)

  • Send Escape if you tap Caps Lock alone.
@paulcc
paulcc / Files.hs
Created November 27, 2012 23:02
Async JS via Fay (Haskell) - see the December PragPub Magazine article
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE NoMonomorphismRestriction #-}
-- Example for December 2012 Prag Pub Magazine
-- expects Fay 0.10
--
-- Fay doesn't support type classes yet (hopefully soon) so this code contains
-- various workarounds and so is a bit more complex than it should be!