- https://wiki.wireshark.org/Development/LibpcapFileFormat
- https://www.kroosec.com/2012/10/a-look-at-pcap-file-format.html (adapted for MacOS terminal)
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
### Step-by-step terminal instructions to install emacspeak on OS X. | |
### Note by Amanda Lacy | |
### This file is based on the set of instructions at this link: | |
### https://gist.github.com/izahn/cd784303663083ee2c95 | |
### Also, thanks to Haden Pike, Tyler Littlefield, David Tseng and others on the Program-L list for their extra tips on Emacspeak settup. | |
### Those extra steps are at the botom of this file. | |
### End note | |
### If you are feeling lucky you can copy and paste this whole file into |
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 Examples.Eratosthenes exposing (..) | |
{-| Sieve of Eratosthenes examples. | |
See <https://www.cs.hmc.edu/~oneill/papers/Sieve-JFP.pdf> for further details on the algorithms. | |
-} | |
import Dict | |
import Generator as G |
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
(use-package js2-mode | |
:ensure t | |
:mode | |
(("\\.m?js\\'" . js2-mode)) | |
:config | |
(add-hook 'js2-mode-hook | |
(lambda () (interactive) (column-marker-1 80))) | |
;; Better imenu | |
(setq js2-mode-show-parse-errors nil) | |
(setq js2-mode-show-strict-warnings nil) |
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
Win probabiloity for A | |
A: 1 B: 1 | Sim: < 0.1% | Exact: < 0.1% | Diff: < 0.1% | Exact: 0 % 1 | |
A: 1 B: 2 | Sim: < 0.1% | Exact: < 0.1% | Diff: < 0.1% | Exact: 0 % 1 | |
A: 1 B: 3 | Sim: < 0.1% | Exact: < 0.1% | Diff: < 0.1% | Exact: 0 % 1 | |
A: 1 B: 4 | Sim: < 0.1% | Exact: < 0.1% | Diff: < 0.1% | Exact: 0 % 1 | |
A: 1 B: 5 | Sim: < 0.1% | Exact: < 0.1% | Diff: < 0.1% | Exact: 0 % 1 | |
A: 1 B: 6 | Sim: < 0.1% | Exact: < 0.1% | Diff: < 0.1% | Exact: 0 % 1 | |
A: 1 B: 7 | Sim: < 0.1% | Exact: < 0.1% | Diff: < 0.1% | Exact: 0 % 1 | |
A: 1 B: 8 | Sim: < 0.1% | Exact: < 0.1% | Diff: < 0.1% | Exact: 0 % 1 | |
A: 1 B: 9 | Sim: < 0.1% | Exact: < 0.1% | Diff: < 0.1% | Exact: 0 % 1 |
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 GeneralizedNewtypeDeriving #-} | |
module Risk where | |
import Control.Monad.Random | |
import Control.Applicative | |
import Data.List (sort, group) | |
import qualified Data.Map as M (fromList, Map, lookup) | |
import Data.Ratio |
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 SExpr where | |
import AParser | |
import Control.Applicative | |
import Data.Char | |
------------------------------------------------------------ | |
-- 1. Parsing repetitions | |
------------------------------------------------------------ |
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 AParser where | |
import Control.Applicative | |
import Data.Char | |
newtype Parser a = Parser { runParser :: String -> Maybe (a, String) } | |
satisfy :: (Char -> Bool) -> Parser Char | |
satisfy p = Parser f | |
where |
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
# watch.sh using fswatch on macOS | |
while true | |
do | |
fswatch -r --one-event -e modify ./src | |
./tcr.sh | |
done | |
# commit.sh using AppleScript to create a GUI prompt | |
MESSAGE=$(osascript -e 'text returned of (display dialog "eEter commit message" default answer "TCR autocommit")') | |
git commit -am "$MESSAGE" |
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
-- {-# OPTIONS_GHC -fno-warn-orphans #-} | |
module Party where | |
import Data.Semigroup | |
import Data.Tree | |
import Data.Function (on) | |
import Data.List (sortBy) | |
import Employee |
NewerOlder