Skip to content

Instantly share code, notes, and snippets.

@siriux
siriux / Readme.txt
Created October 22, 2018 08:55
GPU rasterizer simulator
This is just to simulate and idea for a gpu algorithm to render vector curves with border and dashes.
Some code taken and modified from Pomax: https://github.com/Pomax
@siriux
siriux / Main.scala
Created July 27, 2016 09:32
Scala-js optimized array transforms test
import scala.scalajs.js
import js.JSApp
@inline
class TransformedArray[A, B](origArray: js.Array[A], transformFunction: (A, B => Unit) => Unit) {
@inline
def map[C](f: B => C): TransformedArray[A,C] = {
new TransformedArray(origArray, { (e, cb) =>
transformFunction(e, x => cb(f(x)))

Keybase proof

I hereby claim:

  • I am siriux on github.
  • I am siriux (https://keybase.io/siriux) on keybase.
  • I have a public key whose fingerprint is 0504 8000 CD74 64F8 D024 0696 C4AF CB7B A567 2AC2

To claim this, I am signing this object:

@siriux
siriux / gist:f84d817b526a476686b5
Last active August 29, 2015 14:15
Transform flowRegions from Inkscape into foreignObjects
// window.onload = init; // This can be overwritten
window.addEventListener("load",init);
function init() {
var texts = document.querySelectorAll("flowRoot");
for (var i = 0; i < texts.length; i++) {
var t = texts[i];
var rect = t.querySelector("flowRegion > rect");
@siriux
siriux / MultivalueBenchmark.scala
Created July 6, 2014 10:49
Multivalue Benchmark on idea for scala value-plugin
import org.scalameter.api._
trait MultiValueStorage {
var val1: Long = 0
var val2: Long = 0
var val3: Long = 0
var val4: Long = 0
var val5: Long = 0
var ref1: Object = _
@siriux
siriux / helloworld-dynamic.html
Created July 20, 2013 09:35
Code to load ScalaJS files dynamically during development: See: https://groups.google.com/forum/?fromgroups#!topic/scala-js/kZMM6vvXs68
<!DOCTYPE html>
<html>
<head>
<title>Hello world - Scala.js example</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
</head>
<body>
<div id="playground">
@siriux
siriux / FontAwesomeSession.json
Created October 23, 2012 07:20
IcoMoon Session containing FontAwesome with correct names
{"icomoon":"{\"selected\":[{\"idx\":\"648\",\"unicode\":\"f0e6\"},{\"idx\":\"647\",\"unicode\":\"f0e7\"},{\"idx\":\"646\",\"unicode\":\"f0e8\"},{\"idx\":\"645\",\"unicode\":\"f0e9\"},{\"idx\":\"644\",\"unicode\":\"f0ea\"},{\"idx\":\"643\",\"unicode\":\"f200\"},{\"idx\":\"750\",\"unicode\":\"f06c\"},{\"idx\":\"749\",\"unicode\":\"f06d\"},{\"idx\":\"748\",\"unicode\":\"f06e\"},{\"idx\":\"747\",\"unicode\":\"f070\"},{\"idx\":\"746\",\"unicode\":\"f071\"},{\"idx\":\"745\",\"unicode\":\"f072\"},{\"idx\":\"744\",\"unicode\":\"f073\"},{\"idx\":\"743\",\"unicode\":\"f074\"},{\"idx\":\"742\",\"unicode\":\"f075\"},{\"idx\":\"741\",\"unicode\":\"f076\"},{\"idx\":\"740\",\"unicode\":\"f077\"},{\"idx\":\"739\",\"unicode\":\"f078\"},{\"idx\":\"738\",\"unicode\":\"f079\"},{\"idx\":\"737\",\"unicode\":\"f07a\"},{\"idx\":\"736\",\"unicode\":\"f07b\"},{\"idx\":\"735\",\"unicode\":\"f07c\"},{\"idx\":\"734\",\"unicode\":\"f07d\"},{\"idx\":\"733\",\"unicode\":\"f07e\"},{\"idx\":\"732\",\"unicode\":\"f080\"},{\"idx\":\"731\",\"uni