Skip to content

Instantly share code, notes, and snippets.

Jakub Fijałkowski jakubfijalkowski

View GitHub Profile
View keybase.md

Keybase proof

I hereby claim:

To claim this, I am signing this object:

@jakubfijalkowski
jakubfijalkowski / Dockerfile
Created Jan 13, 2019
Reverse-proxy yourself to the host
View Dockerfile
FROM neilpang/acme.sh AS cert
ARG OVH_AK
ARG OVH_AS
ARG OVH_CK
# Re-export args as ENV
ENV OVH_AK=${OVH_AK}
ENV OVH_AS=${OVH_AS}
ENV OVH_CK=${OVH_CK}
View Dockerfile
FROM neilpang/acme.sh AS cert
ARG OVH_AK
ARG OVH_AS
ARG OVH_CK
# Re-export args as ENV
ENV OVH_AK=${OVH_AK}
ENV OVH_AS=${OVH_AS}
ENV OVH_CK=${OVH_CK}
@jakubfijalkowski
jakubfijalkowski / arxiv-search.js
Last active Jun 18, 2018
arXiv search for Chrome omnibar
View arxiv-search.js
javascript:window.open('https://arxiv.org/search/?query=' + '%s'.split(' ').map(encodeURI).join('+') + '&searchtype=all&order=-announced_date_first&size=50','_self');
@jakubfijalkowski
jakubfijalkowski / PDA.fsx
Last active Jan 26, 2016
Turing machine (basic model) & PDA simulation in F#, with some examples
View PDA.fsx
open System
type State = int
type StackSymbol = char
type Symbol = char
let toString = List.toArray >> String
let second f (a, b) = (a, f b)
let safeTail = function | [] -> [] | _ :: rest -> rest
let toChars (s : string) = s.ToCharArray() |> Array.toList
@jakubfijalkowski
jakubfijalkowski / sample.fs
Created Jan 21, 2016
Ridiculous perf difference in almost-the-same F# code
View sample.fs
// Version A
let private renderTriangleAlways renderer ctx v1 v2 v3 c =
let ymin', aes = getAEs v1 v2 v3
let mutable ymin = ymin'
for ae1, ae2 in aes do
let ymax = ae1.YMax
for y = ymin to ymax - 1 do
let minX = int (min ae1.X ae2.X)
let maxX = int <| ceil (max ae1.X ae2.X)
View gist:0771bfbd26ce68456d3e
using System.ComponentModel;
using System.Globalization;
using System.Resources;
using System.Windows.Data;
public class TranslationSource
: INotifyPropertyChanged
{
private static readonly TranslationSource instance = new TranslationSource();
You can’t perform that action at this time.