Skip to content

Instantly share code, notes, and snippets.

View jroesch's full-sized avatar

Jared Roesch jroesch

View GitHub Profile
@mslinn
mslinn / scalacDiff
Last active December 17, 2015 20:09
Shows the changes in compiled code from scalac between versions
#!/bin/bash
if [ $# -lt 3 ]; then
echo "Shows the changes in compiled code from scalac between versions"
echo "Usage: $BASH_SOURCE v1 v2 classname"
echo " Where v1 and v2 are legal Scala compiler versions, such as 2.8.0, 2.9.0 and 2.10"
echo " ... and classname is fully qualified, such as com/blah/MyClass"
exit -1
fi
function input {
@milessabin
milessabin / gist:5831007
Created June 21, 2013 13:03
Case class members with shapeless 2.0.0-SNAPSHOT.
[info] Starting scala interpreter...
[info]
Welcome to Scala version 2.10.2 (Java HotSpot(TM) 64-Bit Server VM, Java 1.7.0_21).
Type in expressions to have them evaluated.
Type :help for more information.
scala> import shapeless._
import shapeless._
@milessabin
milessabin / gist:6081113
Last active December 20, 2015 05:49
Slicing and dicing tuples in shapeless 2.0.0-SNAPSHOT.
Welcome to Scala version 2.10.2 (Java HotSpot(TM) 64-Bit Server VM, Java 1.7.0_21).
Type in expressions to have them evaluated.
Type :help for more information.
scala> import shapeless._
import shapeless._
scala> import syntax.tuple._
import syntax.tuple._
@amatus
amatus / rust_for_rpi.md
Last active February 18, 2017 21:13 — forked from anonymous/gist:6664882
Howto build a rust compiler for the Raspberry Pi on Debian 7.1 (wheezy)

Howto build a rust compiler for the Raspberry Pi on Debian 7.1 (wheezy)

sudo apt-get install git build-essential
test `uname -m` = x86_64 && sudo apt-get install ia32-libs
git clone https://github.com/raspberrypi/tools.git
export PATH=$PWD/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin:$PATH
git clone http://github.com/mozilla/rust.git
cd rust
./configure --target-triples=arm-unknown-linux-gnueabihf

make

JDBC API for Scala

Data types required

Primitives

  • Option[A] (?)
  • SQLException / A (/)
  • InvariantNotMet / A (~)
  • SqlEffect[A] (!)
@jtopper
jtopper / gist:8588263
Last active December 29, 2024 17:29
Add a new disk to a VMWare vagrant box
config.vm.provider :vmware_fusion do |vm|
vdiskmanager = '/Applications/VMware\ Fusion.app/Contents/Library/vmware-vdiskmanager'
dir = "#{ENV['HOME']}/vagrant-additional-disk"
unless File.directory?( dir )
Dir.mkdir dir
end
@lrytz
lrytz / z-automator.png
Last active October 15, 2024 06:31
Shortcut for Syntax Highlighting in Keynote
@puffnfresh
puffnfresh / extensions.el
Last active May 31, 2018 09:24
Proof General under spacemacs
(defvar coq-pre-extensions
'(
proof-general
))
(defun coq/init-proof-general ()
"Initialize Proof General"
(use-package proof-site
:defer t
:mode ("\\.v\\'" . coq-mode)