Skip to content

Instantly share code, notes, and snippets.

View paulp's full-sized avatar
🤫

Paul Phillips paulp

🤫
  • CAZ, Inc.
  • Cascadia Autonomous Zone
View GitHub Profile
@paulp
paulp / orgies.txt
Created February 17, 2017 00:24
Translation counts for all permutations of οργυιά όργια άρχων αρχών
9 fathom fathom lord
4 fathom fathom authorities
3 fathom fathom fathom
3 orgies orgies squire
2 authorities fathom authorities
2 authorities fathom lord
2 authorities orgies orgies
2 fathom authorities squire
2 fathom orgies orgies
2 fathom squire squire
Two arrested in Kidnapping case that spanned Jefferson and Deschutes Counties
Deschutes Co. Sheriff's Office - 01/29/17 7:16 PM
Release by : Lt. Chad Davis
Deschutes County Sheriff's Office, Detective Division
Date reported: 1/27/17 at 3:40 p.m.
Locations: 12581 SW Cinder Drive, Crooked River Ranch, Or (Jefferson County)
Sisters Mainline Station, 1001 Rail Way, Sisters
Sisters Motor Lodge, 511 W. Cascade, Sister, Or
@paulp
paulp / sbt-new
Created January 2, 2017 17:57
a less messy sbt new
#!/usr/bin/env bash
#
# Intercepting the output of 'sbt new' directly fails
# because it asks interactive questions so we can't process
# line by line. An apparent OSX-specific bug in egrep
# fails on lookbehind clauses so we use ag. Capturing
# the interactive output with script succeeds, but script
# uses \r\n to terminate lines so we can't match the
# filename with '.*' or we get
#
@paulp
paulp / sbt-with-coursier.sh
Last active March 30, 2017 07:58
sbt from zero to shell in 39s.
#!/usr/bin/env bash -x
#
# Invoke sbt starting with no local jars, using coursier.
shopt -s globstar
set -euo pipefail
cpof() {
find "$@" -iname '*.jar' -o -iname '*.zip' | paste -sd: -
}
@paulp
paulp / global.sbt
Last active October 16, 2018 19:09
continuous compilation of the sbt build
// These lines go in ~/.sbt/0.13/global.sbt
watchSources ++= (
(baseDirectory.value * "*.sbt").get
++ (baseDirectory.value / "project" * "*.scala").get
++ (baseDirectory.value / "project" * "*.sbt").get
)
addCommandAlias("rtu", "; reload ; test:update")
addCommandAlias("rtc", "; reload ; test:compile")
addCommandAlias("ru", "; reload ; update")
@paulp
paulp / keybase.md
Created December 4, 2016 01:40
keybase

Keybase proof

I hereby claim:

  • I am paulp on github.
  • I am psp (https://keybase.io/psp) on keybase.
  • I have a public key ASDwGRzYgWx4883GteKJWkvg6YpXrm6teE0VkeqUij5NNgo

To claim this, I am signing this object:

@paulp
paulp / scala.sql
Created November 29, 2016 19:55
Sample query for ghtorrent bigquery tables: counting scala commits
select u.login as login, count(c.id) as ccount
from [ghtorrent-bq:ght.project_commits] pc join
[ghtorrent-bq:ght.commits] c on pc.commit_id = c.id join
[ghtorrent-bq:ght.projects] p on p.id = pc.project_id join
[ghtorrent-bq:ght.users] u on c.author_id = u.id,
where p.language = 'Scala' AND p.forked_from is null
group by login
order by ccount desc
it/src/main/resources/tests/caseVariations.test
it/src/main/resources/tests/different-flattens.test
it/src/main/resources/tests/fakeObjectId.test
it/src/main/resources/tests/joins/3WayJoin.test
it/src/main/resources/tests/joins/constantOnLeft.test
it/src/main/resources/tests/joins/crossJoin.test
it/src/main/resources/tests/joins/crossJoinWithOneSidedConditions.test
it/src/main/resources/tests/joins/groupedJoin.test
it/src/main/resources/tests/joins/innerEquiJoin.test
it/src/main/resources/tests/joins/innerEquiJoinWithWildcard.test
package sfs
package api
/*
* Conventions:
*
* - methods that are intended to be used with 'type parameters only' should be written:
* `def name[A]()(implicit z: Implicit[A]): ReturnType`
* The argument list should be empty and the implicit should be in the second argument list.
* This makes explicit passing of the argument awkward. Implicit arguments are typically called `z`
type Algebra[F[_], A] = F[A] => A
type AlgebraM[M[_], F[_], A] = F[A] => M[A] // Why isn't F ~> M sufficient?
type Coalgebra[F[_], A] = A => F[A]
/** What do these type aliases buy - they are composing type
* constructors in different orders, but no more simply?
*/
type GAlgebra[W[_], F[_], A] = Algebra [ λ[X => F[W[X]]], A]
type GAlgebraM[W[_], M[_], F[_], A] = AlgebraM[M, λ[X => F[W[X]]], A]
type GCoalgebraM[N[_], M[_], F[_], A] = Coalgebra[λ[X => M[F[N[X]]]], A]