Skip to content

Instantly share code, notes, and snippets.

View jarlrasm's full-sized avatar

Jarl Sveinung Flø Rasmussen jarlrasm

View GitHub Profile
@jarlrasm
jarlrasm / gist:16b3903e9b56c198aaec0957bc54017a
Last active September 30, 2016 08:53
C# Find string mismatch(Protip: it is \r\n).There sure must be some easier way to do this.
var mismatch = text1.Zip(text2, (x, y) => new { x, y })
.Aggregate(new { total = "", mismatch = "" },
(current, t) => new
{
total = current.total + new string(new char[] { t.x }),
mismatch =
(t.x == t.y) ? current.mismatch : current.total,
});
@jarlrasm
jarlrasm / Dockerfile
Last active April 10, 2016 21:39
Dockerfile for clojurescript running on nginx
FROM nginx
RUN apt-get update && apt-get install --no-install-recommends --no-install-suggests -y curl default-jre && rm -rf /var/lib/apt/lists/*
RUN curl https://raw.githubusercontent.com/technomancy/leiningen/stable/bin/lein > /usr/bin/lein && chmod 755 /usr/bin/lein
ENV LEIN_ROOT=1
RUN lein
COPY . /app
RUN cd app && lein cljsbuild once release && cp -r resources/public/. /usr/share/nginx/html
CMD ["nginx", "-g", "daemon off;"]

Keybase proof

I hereby claim:

  • I am jarlrasm on github.
  • I am jarl (https://keybase.io/jarl) on keybase.
  • I have a public key whose fingerprint is C0BB FB31 6FA9 201D F987 FD08 3915 CAE2 BBD8 F966

To claim this, I am signing this object: