This post reviews several methods for converting a Markdown (.md) formatted file to PDF, from UNIX or Linux machines.
$ pandoc How_I_got_svg-resizer_working_on_Mac_OSX.md -s -o test1.pdf
| ##Some points to mention... | |
| ## | |
| ##The model knows nothing about the view or the controller. | |
| ##The view knows nothing about the controller or the model. | |
| ##The controller understands both the model and the view. | |
| ## | |
| ##The model uses observables, essentially when important data is changed, | |
| ##any interested listener gets notified through a callback mechanism. | |
| ## | |
| ##The following opens up two windows, one that reports how much money you |
| // runs in https://twigl.app/, geekest (300 es) mode | |
| #define tex(i,j) texture(b,fract((FC.xy+vec2(i,j))/r)) | |
| #define tx(i,j) tex(i,j).a | |
| #define isGround(v) (abs(v-.5)<.1) | |
| #define isSand(v) (abs(v-1.)<.1) | |
| #define fallL(i,j) (int(f)%2==0) | |
| #define fallR(i,j) !fallL(i,j) | |
| #define prio(i,j) fsnoise(uv+vec2(i,j)-t) | |
| vec2 uv = FC.xy/r; |
using mocha/chai/sinon for node.js unit-tests? check out my utility: mocha-stirrer to easily reuse test components and mock require dependencies
| 'use strict'; | |
| /** | |
| https://github.com/derickbailey/jasmine.async | |
| (MIT License) | |
| Copyright ©2012 Muted Solutions, LLC. All Rights Reserved. | |
| */ | |
| var AsyncSpec = (function() { | |
| 'use strict'; |
| //infix operator-precedence parser | |
| //also supports a d operator - a dice roll | |
| var parsePrecedence = (function () { | |
| //we don't care about whitespace. well, most whitespace | |
| var whitespace = { | |
| ' ' : true, | |
| '\t' : true | |
| }; |
| # -------------------------------------------------------------------- | |
| # An implementation of Kruskal's algorithm for generating mazes. | |
| # Fairly expensive, memory-wise, as it requires memory proportional | |
| # to the size of the entire maze, and it's not the fastest of the | |
| # algorithms (what with all the set and edge management is has to | |
| # do). Also, the mazes it generates tend to have a lot of very short | |
| # dead-ends, giving the maze a kind of "spiky" look. | |
| # -------------------------------------------------------------------- | |
| # NOTE: the display routine used in this script requires a terminal | |
| # that supports ANSI escape sequences. Windows users, sorry. :( |
| // Dijkstra Algorithm Example | |
| // - Using suite data structure make algorithm clearer | |
| // compile graph data to vertices structure: {"label": Vertex, ...} | |
| // - Graph: [{from: "label", to: "label". cost: number}, ...] | |
| // - Vertex: {label: string, edges: [{dest: Vertex, cost: number}, ...]} | |
| var compileVertices = function (graph) { | |
| var vs = {}; | |
| graph.forEach(function (edge) { | |
| if (!vs[edge.from]) vs[edge.from] = {label: edge.from, edges: []}; |
| /* | |
| I've wrapped Makoto Matsumoto and Takuji Nishimura's code in a namespace | |
| so it's better encapsulated. Now you can have multiple random number generators | |
| and they won't stomp all over eachother's state. | |
| If you want to use this as a substitute for Math.random(), use the random() | |
| method like so: | |
| var m = new MersenneTwister(); |