Skip to content

Instantly share code, notes, and snippets.

@blackcater
blackcater / diagrams.md
Created July 6, 2018 16:45
Markdown Diagrams

Diagrams

Markdown Preview Enhanced supports rendering flow charts, sequence diagrams, mermaid, PlantUML, WaveDrom, GraphViz, Vega & Vega-lite, Ditaa diagrams. You can also render TikZ, Python Matplotlib, Plotly and all sorts of other graphs and diagrams by using Code Chunk.

Please note that some diagrams don't work well with file exports such as PDF, pandoc, etc.

Flow Charts

This feature is powered by flowchart.js.

on("add:character", function(obj) {
// If there aren't any ability objects to grab, then we're probably in the middle of a sandbox spin-up
if (findObjs({ _type: "ability"}).length === 0)
return;
var abil = findObjs({ _type: "ability", _characterid: obj.id});
if (abil.length === 0) // Only create the abilities if the character doesn't have any
{
createObj("ability", {
name: "Init",
@staltz
staltz / introrx.md
Last active February 1, 2025 01:23
The introduction to Reactive Programming you've been missing
@mmattax
mmattax / Model.php
Created February 15, 2013 20:32
PDO based port of PEAR's DB_DataObject
<?php
namespace Framework;
use \PDO;
use \Exception;
abstract class Model {
private static $_host;
private static $_username;
private static $_password;
private static $_database;
@kares
kares / jquery.parseparams.js
Created May 5, 2011 11:28
jQuery.parseParams - parse query string paramaters into an object
/**
* $.parseParams - parse query string paramaters into an object.
*/
(function($) {
var re = /([^&=]+)=?([^&]*)/g;
var decodeRE = /\+/g; // Regex for replacing addition symbol with a space
var decode = function (str) {return decodeURIComponent( str.replace(decodeRE, " ") );};
$.parseParams = function(query) {
var params = {}, e;
while ( e = re.exec(query) ) {