Skip to content

Instantly share code, notes, and snippets.

View erikkaplun's full-sized avatar

Erik Kaplun erikkaplun

  • UXO
  • Tallinn, Estonia
View GitHub Profile
~$ ls /Library/Java/JavaVirtualMachines/jdk1.7.0_*.jdk/Contents/Home/jre
/Library/Java/JavaVirtualMachines/jdk1.7.0_25.jdk/Contents/Home/jre:
COPYRIGHT README THIRDPARTYLICENSEREADME.txt bin
LICENSE THIRDPARTYLICENSEREADME-JAVAFX.txt Welcome.html lib
/Library/Java/JavaVirtualMachines/jdk1.7.0_40.jdk/Contents/Home/jre:
COPYRIGHT README THIRDPARTYLICENSEREADME.txt bin
LICENSE THIRDPARTYLICENSEREADME-JAVAFX.txt Welcome.html lib
/Library/Java/JavaVirtualMachines/jdk1.7.0_60.jdk/Contents/Home/jre:
val httpService = new RhoService {
GET / "hello" / 'world +? param[Int]('fav) |>> { params =>
Ok(s"Received ${params('fav)}, ${params('world)}")
}
}
package main
import scala.annotation.implicitNotFound
object DemoWithNaiveSupertype extends App {
trait Addable {
def +(other: Addable): Addable
}
case class Foo(x: Int) extends Addable {
object Manage {
sealed trait SubCmd
case class DeployCmd(deployUser: String, deployDir: String, noPack: Boolean) extends SubCmd
case class RestartCmd(restartUser: String) extends SubCmd
case object LogCmd extends SubCmd
case object ConsoleCmd extends SubCmd
case class ManageCmd(
verbose: Boolean = false,
quiet: Boolean = false,
import scala.util.Try
import scalaz._, Scalaz._
object InputValidation {
type Va[A] = Validation[String, A]
type VaNel[A] = ValidationNel[String, A]
type Vali[A, B] = Kleisli[Va, A, B]
type ValiNel[A, B] = Kleisli[VaNel, A, B]
~/code/idris/idris-tutorial$ pandoc --from=latex --to=epub idris-tutorial.screen.tex -o idris-tutorial.screen.epub
pandoc:
Error at "./content/typesfuns.tex" (line 688, column 9):
unexpected " "
expecting "{" or "\\"
(that is, \Idris{} uses \emph{eager} evaluation). However, this is not always
^
{"title":"Niger","version":"1.0.3","type":"FeatureCollection","copyright":"Copyright (c) 2014 Highsoft AS, Based on data from Natural Earth http://www.naturalearthdata.com","copyrightShort":"Natural Earth","copyrightUrl":"http://www.naturalearthdata.com","crs":{"type":"name","properties":{"name":"urn:ogc:def:crs:EPSG:26392"}},"features":[{"type":"Feature","id":"NE.NI","properties":{"hc-group":"admin1","hc-middle-x":0.48,"hc-middle-y":0.44,"hc-key":"ne-ni","hc-a2":"NI","labelrank":"6","hasc":"NE.NI ","alt-name":null,"woe-id":"20069994","subregion":null,"fips":"NG09","postal-code":"NI","name":"Niamey","country":"Niger","type-en":"Capital District","region":null,"longitude":"2.12167","woe-name":"Niamey","latitude":"13.562","woe-label":"Niamey, NE, Niger","type":"Communauté Urbaine"},"geometry":{"type":"Polygon","coordinates":[[[214,717],[230,716],[237,710],[231,690],[214,693],[202,706],[205,716],[214,717]]]}},{"type":"Feature","id":"NE.TH","properties":{"hc-group":"admin1","hc-middle-x":0.50,"hc-middle-y":0.61,
2015-12-20 01:35:25 +0200
cmake
-DCMAKE_INSTALL_PREFIX=/usr/local/Cellar/hhvm/3.11.0
-DDEFAULT_CONFIG_DIR=/usr/local/etc/hhvm
-DCMAKE_CXX_COMPILER=/usr/local/opt/llvm/bin/clang++
-DCMAKE_C_COMPILER=/usr/local/opt/llvm/bin/clang
-DCMAKE_ASM_COMPILER=/usr/local/opt/llvm/bin/clang
-DENABLE_MCROUTER=OFF
-DENABLE_EXTENSION_MCROUTER=OFF
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoMonomorphismRestriction #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE UnicodeSyntax #-}
module Entrypoint
( runMain
~$ brew cleanup hhvm
~$ brew install --verbose hhvm
==> Installing hhvm from hhvm/hhvm
==> Downloading http://dl.hhvm.com/source/hhvm-3.11.0.tar.bz2
Already downloaded: /Library/Caches/Homebrew/hhvm-3.11.0.tar.bz2
==> Verifying hhvm-3.11.0.tar.bz2 checksum
tar xf /Library/Caches/Homebrew/hhvm-3.11.0.tar.bz2
==> cmake -DCMAKE_INSTALL_PREFIX=/usr/local/Cellar/hhvm/3.11.0 -DDEFAULT_CONFIG_DIR=/usr/local/etc/hhvm -DCMAKE_CXX_COMPILER=/usr/local/opt/llvm/bin/clang++ -DCMAKE_C_COMPILER=/usr/local/opt/llvm/bin/clang -DCMAKE_ASM_COMPILER=/usr/local/opt/llvm/bin/clang -DENABLE_MCROUTER=OFF -DENABLE_EXTENSION_MCROUTER=OFF -DENABLE_EXTENSION_IMAP=OFF -DMYSQL_UNIX_SOCK_ADDR=/tmp/mysql.sock -DCMAKE_C_FLAGS=-I/usr/local/opt/readline/include -L/usr/local/opt/readline/lib -DCMAKE_CXX_FLAGS=-I/usr/local/opt/readline/include -L/usr/local/opt/readline/lib -DBOOST_INCLUDEDIR=/usr/local/opt/boost/include -DBOOST_LIBRARYDIR=/usr/local/opt/boost/lib -DFREETYPE_INCLUDE_DIRS=/usr/local/opt/freetype/include/freetype2 -DFREETYPE_LIBRAR