Skip to content

Instantly share code, notes, and snippets.

View startling's full-sized avatar

Lizzie Dixon startling

View GitHub Profile

TLDR version, if you have homebrew

xcode-select --install ; brew tap homebrew/versions ;   brew tap homebrew/dupes \
brew install apple-gcc42 ; brew link apple-gcc42 

NB: the xcode-select --install is how you (re)install the mavericks xcode 5 CLI tools, you HAVE to do that. Either way, you should make sure you have CLI tools installed.

NB: apple-gcc42 is quite old, but doesn't require a build from source (so it can work right away). Those who have a bit more patience and want a more modern GCC can use brew install gcc48 or the like (though the build may take a while)

bash-3.2$ cabal install libssh2
Resolving dependencies...
Notice: installing into a sandbox located at
/Users/tim/Code/beholder/.cabal-sandbox
Configuring libssh2-0.2.0.1...
Building libssh2-0.2.0.1...
Failed to install libssh2-0.2.0.1
Last 10 lines of the build log ( /Users/tim/Code/beholder/.cabal-sandbox/logs/libssh2-0.2.0.1.log ):
Building libssh2-0.2.0.1...
Preprocessing library libssh2-0.2.0.1...
(def ^:dynamic *example* "Unchanged!")
(binding [*example* 12] (map (fn [_] *example*) [0])) ;; ["Unchanged!"]
use strict;
use warnings;
use Irssi;
our $VERSION = "0.0";
our %IRSSI = (
authors => "startling",
contact => "tdixon51793\@gmail.com",
name => "Renotify",

Keybase proof

I hereby claim:

  • I am startling on github.
  • I am startling (https://keybase.io/startling) on keybase.
  • I have a public key whose fingerprint is 73BF 793C 60B3 361D 0B48 B010 C960 E5A9 93C0 A29A

To claim this, I am signing this object:

-- bound
import Bound
-- | Standalone type for 'let' bindings.
data Lets f v = Lets (f v) (Scope () f v)
instance Bound Lets where
Lets l b >>>= f = Lets (l >>= f) (b >>>= f)
-- | Abstract syntax trees with optional extra types involved.
@startling
startling / backup
Last active January 4, 2016 07:59
Back up important stuff from an android phone via adb.
#!/usr/bin/env sh
# USAGE: ./backup [texts] [pictures] [downloads]
# You can put other files you'd like to back up in $FILES
# Things to remember.
TEXTS="/data/data/com.android.providers.telephony/databases/mmssms.db"
PICTURES="/mnt/sdcard/DCIM/ /mnt/sdcard/Pictures/"
DOWNLOADS="/mnt/sdcard/Download/"
# Parse args.
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE DeriveFunctor #-}
{-# LANGUAGE DeriveFoldable #-}
{-# LANGUAGE DeriveTraversable #-}
-- base
import Data.List
import Data.Monoid
import Data.Foldable (Foldable)
import Data.Traversable (Traversable)
import Control.Applicative
public final class Nat {
private final Nat predecessor;
private Nat (Nat n) {
predecessor = null;
}
public static Nat S(Nat n) {
return new Nat(n);
}
@startling
startling / srpx.idr
Last active December 22, 2015 06:48
data Even : Nat -> Type where
zeroIsEven : Even O
evenPlusTwoIsEven : Even k -> Even (k + 2)
twoIsEven : Even 2
twoIsEven = evenPlusTwoIsEven zeroIsEven
threeIsn'tEven : Even 3 -> _|_
threeIsn'tEven zeroIsEven impossible
threeIsn'tEven (evenPlusTwoIsEven n) impossible