Skip to content

Instantly share code, notes, and snippets.

View kaa's full-sized avatar

Joakim Beijar kaa

View GitHub Profile
@kaa
kaa / grid.html
Created January 22, 2022 13:16
Grid
<html style="background:black">
<textarea id="input"></textarea><br>
<img style="position: absolute; top: 0; left: 50%; transform: translateX(-50%); max-height: 100vh; max-width: 100vw" id="grid">
<script>
grid = document.getElementById("grid")
area = document.getElementById("input")
area.addEventListener("change", function(){
i = 0;
items = area.value.split("\n").map(t => t.replace("/small/","/big/").replace("/thumbs","/img").replace("_t.","."));
update();
0x42dF7cFE633C7d86A89015D4c3903cD991738df0
@kaa
kaa / AssemblyInformationalVersionExtensions.cs
Created October 19, 2012 08:07
Extension method to extract informational version string from assembly metadata
public static class AssemblyInformationalVersionExtensions {
public static string GetInformationalVersionString(this Assembly assembly) {
return assembly
.GetCustomAttributes(typeof(AssemblyInformationalVersionAttribute), false)
.Cast<AssemblyInformationalVersionAttribute>()
.Select(t=>t.InformationalVersion)
.FirstOrDefault();
}
}
@kaa
kaa / carbon.init.sh
Created September 6, 2012 07:51 — forked from pkhamre/readme.markdown
Installing graphite 0.9.10 and statsd on Amazon Linux
#!/bin/bash
#
# Carbon (part of Graphite)
#
# chkconfig: 3 50 50
# description: Carbon init.d
. /etc/rc.d/init.d/functions
prog=carbon
RETVAL=0
@kaa
kaa / gist:1344648
Created November 7, 2011 10:46 — forked from KarlHerler/gist:1321706
productsample json
[
{
articleNo: 3065,
name: "Käsisaippua (sininen)",
price: "4,40 €",
tags: ["hands", "wash", "designs"],
color: 23.568, /* 0.0-360.0 deg, hue enligt HSL color space */
height: 10,
space: 2,
},