Skip to content

Instantly share code, notes, and snippets.

@chrsan
chrsan / Cargo.toml
Created June 7, 2020 13:54
cairo-rs stride fix
[package]
name = "cairo-rs-stride-fix"
version = "0.1.0"
authors = ["Christer Sandberg <[email protected]>"]
edition = "2018"
[dependencies]
cairo-sys-rs = "0.9.1"
[dependencies.cairo-rs]
@chrsan
chrsan / build.sh
Created June 18, 2019 09:24
Built HarfBuzz with wasi-sdk-5.0
./configure --host=wasm32-wasi CFLAGS="-DHB_NO_MT" CXXFLAGS="-DHB_NO_MT" CC="/opt/wasi-sdk-5.0/bin/clang --sysroot=/opt/wasi-sdk-5.0/share/sysroot" CXX="/opt/wasi-sdk-5.0/bin/clang++ --sysroot=/opt/wasi-sdk-5.0/share/sysroot" AR="/opt/wasi-sdk-5.0/bin/llvm-ar" RANLIB="/opt/wasi-sdk-5.0/bin/llvm-ranlib" --prefix=/opt/harfbuzz-build-wasi-sdk-5.0 --enable-static=yes --enable-shared=false
@chrsan
chrsan / command.go
Created October 13, 2016 13:49
Go rasterizing test
package main
import (
"bufio"
"io"
"log"
"os"
"strconv"
"strings"
)
@chrsan
chrsan / joker.go
Last active August 29, 2015 14:19 — forked from dvalfrid/joker.sh
package main
// Fetch dependencies: go get golang.org/x/net/html
// Run as a shell script: go run joker.go -h
// Build as a static binary: go build joker.go && ./joker -h
//
// '-h' displays the command line flags
//
// Author: chrsan
@chrsan
chrsan / AkkaSourceDiscriminator.java
Created September 27, 2012 13:14
A logback discriminator for the akkaSource MDC value.
package se.fishtank;
import java.net.URI;
import java.util.Map;
import ch.qos.logback.classic.spi.ILoggingEvent;
import ch.qos.logback.core.sift.Discriminator;
import ch.qos.logback.core.spi.ContextAwareBase;
public class AkkaSourceDiscriminator extends ContextAwareBase implements Discriminator<ILoggingEvent> {
@chrsan
chrsan / AkkaUnfilteredSample.scala
Created February 17, 2012 09:47
Akka 2.0 unfiltered RESTful sample
package akka.unfiltered
import akka.actor._
import akka.dispatch.Future
import akka.pattern.ask
import akka.util.duration._
import akka.util.Timeout
import unfiltered.Async
import unfiltered.request._