Skip to content

Instantly share code, notes, and snippets.

View Orbifold's full-sized avatar
🍀
Happy. Thinking. Understanding.

Francois Vanderseypen Orbifold

🍀
Happy. Thinking. Understanding.
View GitHub Profile
@Orbifold
Orbifold / main.cs
Created January 31, 2016 13:24
Question-answer from StackOveflow via the StacMan package
static void Main(string[] args)
{
var client = new StacManClient(key: "Your-key", version: "2.1");
var response = client.Search.GetMatchesAdvanced("stackoverflow",
page: 1,
pagesize: 10,
sort:SearchSort.Relevance,
accepted:true,
title:"whatever you like to search for",
order: Order.Desc,
@Orbifold
Orbifold / MoveArrayItem.js
Created October 23, 2014 07:04
Move an item in place in an array.
Array.prototype.move = function (pos1, pos2) {
var i, tmp;
pos1 = parseInt(pos1, 10);
pos2 = parseInt(pos2, 10);
if (pos1 !== pos2 &&
0 <= pos1 && pos1 <= this.length &&
0 <= pos2 && pos2 <= this.length) {
// save element from position 1
tmp = this[pos1];
@Orbifold
Orbifold / Diagram-pdf
Last active August 29, 2015 14:07
Kendo diagram, PDF and drawing
<!DOCTYPE html>
<html>
<head>
<title>Kendo Diagramming</title>
<link rel="stylesheet/less" type="text/css" href="../../styles/web/kendo.common.less"/>
<link rel="stylesheet/less" type="text/css" href="../../styles/web/kendo.default.less"/>
<link rel="stylesheet/less" type="text/css" href="../../styles/dataviz/kendo.dataviz.less"/>
<link rel="stylesheet/less" type="text/css" href="../../styles/dataviz/kendo.dataviz.default.less"/>
<script type="text/javascript" src="../../demos/mvc/content/shared/js/less.js"></script>
@Orbifold
Orbifold / Basic.html
Last active August 29, 2015 14:07
Basic reation of a yFile diagram.
<!DOCTYPE html>
<html>
<head>
<title>Hello, yFiles for HTML</title>
<link type="text/css" rel="stylesheet" href="/OrbyWorks/lib/yfiles.css">
<style>
html, body, #graphCanvas, .canvascontrol {
width: 100%;
height: 80%;
@Orbifold
Orbifold / yFilesModuleNesting
Created October 6, 2014 12:19
yFiles module nesting
yfiles.module("Life", function (exports) {
var Person = Class('Person',
{
constructor: function (name) {
this.name = name;
},
toString: function () {
return this.name;
}
@Orbifold
Orbifold / PenroseDrawingStyle
Created October 2, 2014 06:34
Penrose drawing style
g3 = Graphics3D[{Gray, KnotData[{6, 2}, "ImageData"]},
Lighting -> "Neutral", Boxed -> False];
img = ColorConvert[Rasterize[g3, "Image", ImageResolution -> 72],
"GrayLevel"];
edge = ColorNegate@EdgeDetect[img];
Manipulate[
dots = Image@