Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View stephenjbarr's full-sized avatar

Stephen Jeffrey Barr stephenjbarr

View GitHub Profile
@Icelandjack
Icelandjack / Notation.markdown
Last active July 6, 2019 18:37
Notes on Notation

Non-standard operators I use :) linked to from my twitter profile

I use kind synonyms

type T   = Type
type TT  = T -> T
type TTT = T -> TT
type C   = Constraint
type TC  = T -> C
@bradwestfall
bradwestfall / S3-Static-Sites.md
Last active April 10, 2024 16:40
Use S3 and CloudFront to host Static Single Page Apps (SPAs) with HTTPs and www-redirects. Also covers deployments.

S3 Static Sites

⚠ This post is fairly old. I don't keep it up to date. Be sure to see comments where some people have posted updates

What this will cover

  • Host a static website at S3
  • Redirect www.website.com to website.com
  • Website can be an SPA (requiring all requests to return index.html)
  • Free AWS SSL certs
  • Deployment with CDN invalidation
(require 'dash)
(require 's)
(require 'loop)
(require 'icons-in-terminal)
(defun my-char-at-point (&optional p)
"P."
(let ((point (or p (point))))
(if (< point (point-max)) (buffer-substring-no-properties point (1+ point))
"")))
module SignupForm exposing (..)
-- This is where our Elm logic lives.`module SignupForm` declares that this is
-- the SignupForm module, which is how other modules will reference this one
-- if they want to import it and reuse its code.
-- Elm’s "import" keyword works similarly to "require" in node.js.
import Html exposing (..)
@snoyberg
snoyberg / .emacs
Last active June 5, 2021 23:04
Michael Snoyman's .emacs file: Stack, haskell-mode, evil-mode
;; Get package installation ready
(require 'package)
(setq package-enable-at-startup nil)
(add-to-list 'package-archives
'("melpa" . "https://melpa.org/packages/"))
(package-initialize)
;; Theme
(add-to-list 'custom-theme-load-path "~/.emacs.d/themes/")
(load-theme 'zenburn t)
@NathanHowell
NathanHowell / stack.yaml
Created February 3, 2016 06:28
GHC 8.0 release candidate stack/stackage yaml
resolver: ghc-8.0.0.20160111
setup-info:
ghc:
linux64:
8.0.0.20160111:
url: "http://downloads.haskell.org/~ghc/8.0.1-rc1/ghc-8.0.0.20160111-x86_64-deb7-linux.tar.xz"
content-length: 111404852
sha1: 30d39c6ca6994dcafe25595e053035ad23198b52
macosx:
8.0.0.20160111:
@maxkfranz
maxkfranz / index.html
Last active March 29, 2021 09:58
cytoscape-dagre demo
<!DOCTYPE>
<html>
<head>
<title>cytoscape-dagre.js demo</title>
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1, maximum-scale=1">
<script src="http://code.jquery.com/jquery-2.0.3.min.js"></script>
@drwebb
drwebb / HaskellR.hs
Created September 7, 2015 16:37
GGplot in Haskell
demographicsAnalysis :: (MonadIO m, H.MonadR m) => Frame User -> m ()
demographicsAnalysis fr = do
let demographics = fmap (rcast :: User -> Record '[HaskellExperience
,RecommendHaskell
,Occupation])
(nubbed, counts) = view (runGetter ((,) <$> Getter (_1) <*> Getter _2))
(unzip
(sortByLens (_1.recommendHaskell)
(sortByLens (_1.haskellExperience)
@rehno-lindeque
rehno-lindeque / NixSetup.md
Last active April 2, 2024 20:18
NixOS Setup (Virtualized + Haskell + Gnome3 + XMonad)

Setup NixOS (Virtualized + Haskell + Gnome3 + XMonad)

Before you get started

This is pretty out of date now... you may want to look elsewhere

Newer guides than mine (mine is a bit dated and has a lot of rough edges):

Have you looked at these?

@jepio
jepio / minted.py
Last active September 18, 2023 13:58
Pandoc filter to use minted for syntax highlighting
#!/usr/bin/env python3
'''
Filter to wrap Pandoc's CodeBlocks into minted blocks when using latex.
Pandoc's `fence_code_attributes` can be used to provide:
- the language (first class)
- minted's argumentless options (following classes)
- minted's options with arguments (attributes)
'''