Skip to content

Instantly share code, notes, and snippets.

Constructor Airplane Fuel Consumption Per Hour
Majestic Dash-8 Q400 2400 lbs/hr
QualityWings Avro RJ100 2200 kg/hr
PMDG Boeing 777-300ER 7.6 tonnes/hr
@stevenbeeckman
stevenbeeckman / gauge_template.xslt
Created April 25, 2018 20:15
Build a gauge with SVG generated by XSLT
<xsl:template match="row">
<xsl:variable name="radius">130</xsl:variable>
<xsl:variable name="width">300</xsl:variable>
<xsl:variable name="value_min"><xsl:value-of select="row/@value_min" /></xsl:variable>
<xsl:variable name="value_max"><xsl:value-of select="row/@value_max" /></xsl:variable>
<xsl:variable name="value_target"><xsl:value-of select="row/@value_target" /></xsl:variable>
<xsl:variable name="red_min"><xsl:value-of select="row/@red_min" /></xsl:variable>
<xsl:variable name="red_max"><xsl:value-of select="row/@red_max" /></xsl:variable>
<xsl:variable name="orange_min"><xsl:value-of select="row/@orange_min" /></xsl:variable>
<xsl:variable name="orange_max"><xsl:value-of select="row/@orange_max" /></xsl:variable>
@stevenbeeckman
stevenbeeckman / README.md
Last active January 14, 2017 13:19
EFHK to RJAA fuel consumption

An attempt to visualize my fuel consumption

Timestamp (UTC) | Total fuel (lbs) | Fuel flow (lbs/hr) | Miles to go (NM)

10h27 | 150200 | 11h00 | 140000 | 20k lbs/hr 11h41 | 129309 | 12h00 | 124500 | 15k lbs/hr 12h32 | 116000 | 18k lbs/hr 13h01 | 108611 | 16k lbs/hr | 3075 miles to go)

@stevenbeeckman
stevenbeeckman / graph_gist_template.adoc
Created January 6, 2016 11:54 — forked from cheerfulstoic/graph_gist_template.adoc
CHANGEME: GraphGist Template. Fork to make your own, view source to see instruction comments

TITLE OF YOUR GRAPHGIST

@stevenbeeckman
stevenbeeckman / routes.js
Created November 22, 2015 18:48
Routes for Villo Analytics
var express = require('express');
var mongoose = require('mongoose');
var moment = require('moment');
var router = express.Router();
router.get('/', function(req, res, next) {
req.db.StationName.find({}, {"name": 1, "number": 1, "_id": 0}, {sort: {"name": 1}}, function(err, names){
if(err){
next(err);
}else{
var stationSchema = new mongoose.Schema({
address: String
, available_bike_stands: Number
, available_bikes: Number
, banking: Boolean
, bike_stands: Number
, bonus: Boolean
, contract_name: String
, last_update: Date
, name: String
@stevenbeeckman
stevenbeeckman / ajax.js
Created October 2, 2015 08:27
HTTP GET through AJAX with jQuery in the browser.
// Docs: http://api.jquery.com/category/ajax/
$.ajax({
type: "GET"
, url: "api/locations.php"
, dataType: "json" //this can be json, XML, ...
, success: function(data){
console.dir(data);
, error: function(err){
console.dir(err);
@stevenbeeckman
stevenbeeckman / Setup Python, IPython and ipython-sql
Last active October 29, 2022 16:11
Setting up IPython Notebook inside of Vagrant
sudo apt-get update
sudo apt-get install build-essential python-dev
sudo apt-get install python-matplotlib
sudo apt-get install python-pip
sudo pip install ipython-sql
sudo pip install --upgrade jinja2 tornado jsonschema pyzmq
sudo apt-get install python-mysqldb
# let's start ipython notebook
ipython notebook --ip=0.0.0.0 # port-forwarding doesn't work without this --ip flag
@stevenbeeckman
stevenbeeckman / gist:4526166
Last active December 11, 2015 01:49
An example of how to call a JSON webservice directly from BlackBerry 10 Cascades QML. This gist also shows how to convert Date strings purely in QML. This gist is part of this blogpost: http://www.shadowmedia.be/bbdevbe/2013/01/13/listing-json-data-from-a-webservice-using-pure-qml/.
import bb.cascades 1.0
import bb.data 1.0 // don't forget to add "LIBS += -lbbdata" to your .pro file!
Page {
id: pgDetail
actions: [
ActionItem {
title: qsTr("Refresh")
onTriggered: {