Skip to content

Instantly share code, notes, and snippets.

View Xunie's full-sized avatar
💭
Apparently,Github is a social network now, yet we don't get private messages,thx

Xunie Xunie

💭
Apparently,Github is a social network now, yet we don't get private messages,thx
View GitHub Profile
"use strict";
/*Compiled using Cheerp (R) by Leaning Technologies Ltd*/
var __imul=Math.imul;
var __fround=Math.fround;
var oSlot=0;var nullArray=[null];var nullObj={d:nullArray,o:0};
function fetchBuffer(p){
var b=null,f='function';
if(typeof fetch===f)b=fetch(p).then(r=>r.arrayBuffer());
else if(typeof require===f){
p=require('path').join(__dirname, p);
@Xunie
Xunie / just some bs.hs
Last active April 16, 2019 20:05
just some bs
-- This represents a single RGB color channel (0-255)
data Chan = Chan {
intensity :: Integer
} deriving Show
-- oh no! that's not a valid intensity!
something = Chan 9999999
@Xunie
Xunie / Useful One Liners
Last active October 14, 2019 09:22
Useful One Liners
# Find, plot & display #include cross-dependencies using Graphviz
# note: Does not handle directories well...
time find . -type f | egrep -i "\.(h|c)(pp)?$" | xargs -L 1 egrep -Hn -i "^#include" | awk -F ":" 'match($1, /\.\/(\S+)/, a) {printf "\""a[1]"\"->\"" }; match($3, /#include ["<](\S+)[>"]/, a) { print a[1] "\"" }' | (echo -e "digraph d {\noverlap = scale\nsplines = true"; cat; echo "}") | neato -Tpng | xli /dev/stdin