Skip to content

Instantly share code, notes, and snippets.

Sean Leather spl

View GitHub Profile
@spl
spl / mendeley-pricing.md
Last active Jan 10, 2019
Mendeley plans with pricing and storage details
View mendeley-pricing.md

These are the simplified pricing and storage numbers for Mendeley subscription plans as of 2019-01-10:

Plan Price/month Price/year (/month) Storage
Plus $4.99 $55 ($4.58) 5GB
Pro $9.99 $110 ($9.17) 10GB
Max $14.99 $165 ($13.75) 100GB*

This information is available only from their [upgrade page] and can only be

@spl
spl / imports.patch
Last active Oct 11, 2018
koka-0.7.1 homebrew patches
View imports.patch
diff --git a/src/Backend/CSharp/FromCore.hs b/src/Backend/CSharp/FromCore.hs
index 0fd96b4..5f945ff 100644
--- a/src/Backend/CSharp/FromCore.hs
+++ b/src/Backend/CSharp/FromCore.hs
@@ -14,6 +14,8 @@ module Backend.CSharp.FromCore( csharpFromCore
-- , arityMapInit, externalMapInit
) where
+import Prelude hiding ((<>))
+
@spl
spl / pre-commit
Created Apr 20, 2017
SVN pre-commit hook script to check for svn:needs-lock
View pre-commit
#!/bin/bash
# This is a pre-commit hook script that checks files for the svn:needs-lock
# property. If the property is not set, the commit will fail with an error
# message that explains what must be done.
# Adapted from: http://stackoverflow.com/a/26037418/545794
# In order to use this script, copy it to:
# <svn-repos-data-dir>/<repos>/hooks/pre-commit
@spl
spl / print_readdir.c
Last active Jan 10, 2017
Print readdir() and stat() info for each directory argument
View print_readdir.c
/* For each argument, this program prints each file name in that directory plus
* the file type. Type 0 is unknown.
*/
#include <stdio.h>
#include <stdlib.h>
#include <sys/dir.h>
#include <sys/stat.h>
#include <unistd.h>
@spl
spl / lean-build.log
Created Aug 25, 2016
Errors compiling lean on Mac
View lean-build.log
$ mkdir -p build/debug
$ cd build/debug/
$ cmake -DCMAKE_BUILD_TYPE=DEBUG -G Ninja ../../src
-- The CXX compiler identification is AppleClang 7.3.0.7030031
-- The C compiler identification is AppleClang 7.3.0.7030031
-- Check for working CXX compiler: /Library/Developer/CommandLineTools/usr/bin/c++
-- Check for working CXX compiler: /Library/Developer/CommandLineTools/usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
@spl
spl / math.vim
Created Aug 3, 2016
Vim unicode TeX key bindings
View math.vim
" Originally from Dan Piponi
:map! \lolly ⊸
:map! \comp ∁
:map! \turn&
:map! \lneg ⅂
:map! \union ∪
:map! \cup ∪
:map! \cap ∩
:map! \alpha α
:map! \alpha α
@spl
spl / .project
Last active Jul 31, 2016
Import and use a class without open in Lean
View .project
+ *.lean
- flycheck*.lean
- .#*.lean
@spl
spl / instance_comparison.lean
Last active Apr 4, 2016
Type class instance comparison with/-out naming, with/-out include
View instance_comparison.lean
/-
First, we add the necessary preliminary declarations:
-/
import data.list
open list
variable {A : Type}
/-
@spl
spl / ovpn-writer.sh
Created Jan 5, 2016 — forked from renatolfc/ovpn-writer.sh
Script to generate an OpenVPN client configuration file in the unified format
View ovpn-writer.sh
#!/bin/sh
##
## Usage: ./ovpn-writer.sh SERVER CA_CERT CLIENT_CERT CLIENT_KEY SHARED_SECRET > client.ovpn
##
server=${1?"The server address is required"}
cacert=${2?"The path to the ca certificate file is required"}
client_cert=${3?"The path to the client certificate file is required"}
client_key=${4?"The path to the client private key file is required"}
@spl
spl / EitherFail.hs
Last active Oct 5, 2015
Either fail
View EitherFail.hs
$ ghci
GHCi, version 7.10.2: http://www.haskell.org/ghc/ :? for help
-- This is a similar to a function found in some library somewhere.
Prelude> let lookupM k v = maybe (fail $ show k ++ " not found in " ++ show v) return $ lookup k v
Prelude> :t lookupM
lookupM
:: (Eq a1, Monad m, Show a, Show a1) => a1 -> [(a1, a)] -> m a
-- What happens when you use Either as the monad?
You can’t perform that action at this time.