Skip to content

Instantly share code, notes, and snippets.

View cdegroot's full-sized avatar

Cees de Groot cdegroot

View GitHub Profile
@cdegroot
cdegroot / gist:5c156329b56f2a71ede3
Created August 24, 2015 17:59
Cross-building with and without cross-building spec in project/Build.scala
13:57:47 cees@Cees-MBP:~/OpenSource/unclever$ sbt "+ package"
Listening for transport dt_socket at address: 5005
[info] Loading project definition from /Users/cees/OpenSource/unclever/project
[info] Set current project to unclever (in build file:/Users/cees/OpenSource/unclever/)
[info] Setting version to 2.10.5
[info] Reapplying settings...
[info] Set current project to unclever (in build file:/Users/cees/OpenSource/unclever/)
[info] Packaging /Users/cees/OpenSource/unclever/target/scala-2.10/unclever_2.10-0.1-SNAPSHOT.jar ...
[info] Done packaging.
[success] Total time: 0 s, completed Aug 24, 2015 1:57:58 PM
@cdegroot
cdegroot / howto.md
Last active November 2, 2015 10:42
How-to JitPack with sbt cross compilation

Introduction

JitPack just added support for multiple Scala versions. This quick how-to describes the changes I made to one of my little projects to make everything work.

SBT changes

If you want to release for multiple Scala versions, you need to test it. Therefore, you need to add the versions you want to test against in project/Build.scala, adding:

defp store_if_new_user(user) do
alias Clueless.User
email = user.email
unless Repo.get_by(User, email: email) do
Repo.insert(User.changeset(%User{}, %{email: email}))
end
end
public void main() {
System.out.println("Hello, World");
}

Keybase proof

I hereby claim:

  • I am cdegroot on github.
  • I am cdegroot (https://keybase.io/cdegroot) on keybase.
  • I have a public key ASBaqyYFuCevXtjGt1pXuQtrnihrtvnge_Ye9gR3EmPexwo

To claim this, I am signing this object:

method = :get
url = "http://foo.bar/lol"
headers = [host: "foo.bar"]
body = "This is some body stuff"
access_key_id = "1234"
secret_access_key = "abcdef"
region = "us-west-2"
aws_config = %{}
|> Map.put(:access_key_id, access_key_id)
Compiling /home/cees/.emacs.d/elpa/ein-20190522.149/ein-ac.el...
Eager macro-expansion failure: (error "Don’t know how to make a localized variable an alias") [2 times]
Checking /home/cees/.emacs.d/elpa/ein-20190522.149... [2 times]
Compiling /home/cees/.emacs.d/elpa/ein-20190522.149/ein-cell-edit.el...
─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Compiling file /home/cees/.emacs.d/elpa/ein-20190522.149/ein-classes.el at Fri May 24 13:24:11 2019
──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Leaving directory ‘/home/cees/.emacs.d/elpa/ein-20190522.149’
─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Compiling file /home/cees/.emacs.d/elpa/ein-20190522.149/ein-ac.el at Fri May 24 13:29:03 2019
loader: version is 20151220+e48858d
memory: initial memory map:
0x0000000000001000-0x0000000000060000 (380 KiB) -> Internal
0x0000000000060000-0x000000000009f000 (252 KiB) -> Free
0x0000000000100000-0x00000000dfff0000 (3668928 KiB) -> Free
0x0000000000000001-0x0000000020000000 (524288 KiB) -> Free
bios: boot device ID is 0x80, partition offset is 0x1000
fs: mounted FAT on hd0,0 ('') (uuid: F766-8E3E)
fs: mounted ext2 on hd0,1 ('') (uuid: 95e269fa-6e6c-493b-87bc-78ddb0cf90dc)
device: detected devices: