Skip to content

Instantly share code, notes, and snippets.

Johan Östling jostly

Block or report user

Report or block jostly

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
jostly / Dockerfile
Created Dec 3, 2015
Dockerfile for running Swift 2.2 development snapshot on Ubuntu 15.10
View Dockerfile
FROM ubuntu:15.10
RUN apt-get -y update
RUN apt-get -y install clang curl libpython2.7 libicu55
RUN curl -o swift.tgz
RUN tar --strip-components=1 -C / -xzf swift.tgz

Keybase proof

I hereby claim:

  • I am jostly on github.
  • I am jostly ( on keybase.
  • I have a public key whose fingerprint is 11B0 ACD5 9E2D FD24 F4E8 7C79 B2A9 7817 CD91 D38C

To claim this, I am signing this object:

jostly / gist:1fc37cb8cc99f53f91e4
Created Nov 4, 2014
Hexdump for Java byte array
View gist:1fc37cb8cc99f53f91e4
StringBuilder output = new StringBuilder();
int col = 0;
int pos = 0;
String[] chars = new String[16];
for (byte b : array) {
if (col == 0) {
output.append("\n" + String.format("%04x", pos) + ": ");
output.append(String.format("%02x ", b));
if (b > 31 && b < 128) {
jostly / gist:4563579
Created Jan 18, 2013
The trouble with hashCode in mutable objects
View gist:4563579
import java.util.HashSet;
import java.util.Set;
public class Main {
public static void main(String[] args) {
Set<Foo> set = new HashSet<Foo>();
Foo apple = new Foo("apple");
You can’t perform that action at this time.