The following are appendices from Optics By Example, a comprehensive guide to optics from beginner to advanced! If you like the content below, there's plenty more where that came from; pick up the book!
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git clone https://github.com/magit/magit | |
cd magit | |
makeinfo --html magit.texi ## you may need to open the texi file and delete the encoding line at the top | |
open magit/index.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun org-table-next-field () | |
"Go to the next field in the current table, creating new lines as needed. | |
Before doing so, re-align the table if necessary." | |
(interactive) | |
(org-table-maybe-eval-formula) | |
(org-table-maybe-recalculate-line) | |
(if (and org-table-automatic-realign | |
org-table-may-need-update) | |
(org-table-align)) | |
(let ((end (org-table-end))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE RankNTypes #-} | |
{-# LANGUAGE TypeOperators #-} | |
{-# LANGUAGE GADTs #-} | |
{-# LANGUAGE DeriveFunctor #-} | |
module Tesser where | |
import Data.List (foldl') | |
import Data.Profunctor | |
import Data.Bifunctor |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# mail.example.com should be one of the results of a `dig +short mx example.com` | |
# Note that your provider might block all port 25. | |
# If STARTTLS header is missing or mangled, but https://starttls.info/ shows example.com as supporting STARTTLS, | |
# there might be a downgrade going on. | |
(echo EHLO foo ; sleep 3) | nc mail.example.com 25 |
- Place your closed laptop on a soft surface, upside down.
- Use a sharp knife to cut a hole in the warranty sticker (YES THIS WILL VOID THE WARRANTY).
- Remove the 13 screws with a small phillips head screwdriver (PH1 size works well). Be careful, the screws are very small and will strip easily if you use the wrong size screwdriver.
- Remove the bottom of the laptop by pulling up on it near the hinges. It takes a bit of pressure to remove, but if you lift it from the back (near the hinges) the same way you would open a laptop screen, the hooks won't break (even though they will make a loud snapping sound).
- Remove the BIOS write-protect screw. It is labeled as #7 in this image
- With the bottom off, turn over the laptop and open the screen.
- Plug the laptop in (it must b
The imports for building the various field-oriented optics are pretty minimal. It's not
until you make a Getter or a Fold that you need to look outside of base
.
This cookbook only covers the field oriented optics and not the constructor oriented ones.
If you want to build a Prism or an Iso without a lens dependency, you should
copy the definition of lens' prism
and iso
combinators and add a profunctors dependency
to your project. Those two combinators are quite self-contained.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module RuntimeTypes where | |
open import Function | |
open import Data.Unit | |
open import Data.Bool | |
open import Data.Integer | |
open import Data.String as String | |
open import Data.Maybe hiding (All) | |
open import Data.List | |
open import Data.List.All |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# HubCrypt | |
# ======== | |
# | |
# Decrypt a file encrypted using hubencrypt (ok, it's just openssl + rsautl + | |
# your SSH keys). It needs the private key that matches your last public key | |
# listed at github.com/<user>.keys | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Docker | |
( Docker -- :: * -> * | |
, ExecType(..) -- :: * | |
, EntrySpec(..) -- :: * | |
, dockerfile -- :: | |
-- * Core commands | |
-- ** Port specification | |
, PortType(..) -- :: * | |
, PortRedirect(..) -- :: * |
NewerOlder