[BASH][bash] script to create a single file [Takahashi][takahashi] web presentation from a [Markdown][markdown] document.
You'll need a [Markdown][markdown] converter named markdown in your
#!/usr/local/bin/python | |
import os | |
import sys | |
import csv | |
from operator import itemgetter | |
from bs4 import BeautifulSoup | |
from anki import Collection as aopen | |
usmle_rx = open("/Users/drlulz/Desktop/test.html",'r').read() |
Result: 1 | |
Items { | |
TemplateId: "BADGE_BATTLE_ATTACK_WON" | |
Badge { | |
BadgeType: BADGE_BATTLE_ATTACK_WON | |
BadgeRanks: 4 | |
Targets: "\nd\350\007" | |
} | |
} | |
Items { |
// Start `node d3-server.js` | |
// Then visit http://localhost:1337/ | |
// | |
var d3 = require('d3'), | |
http = require('http') | |
http.createServer(function (req, res) { | |
// Chrome automatically sends a requests for favicons | |
// Looks like https://code.google.com/p/chromium/issues/detail?id=39402 isn't | |
// fixed or this is a regression. |
/* | |
This script counts all photos that are available on Flickr and Panoramio for a specific geo fence and returns a JSON object with the data. | |
For convenience it's embedded in a little node.js server so that you can upload it to your server and use it as an API. | |
Here's an example url with all query attributes prefilled. Please use your own Flickr API key! | |
The location is the Berlin TV Tower (http://en.wikipedia.org/wiki/Fernsehturm_Berlin) | |
Example URL: http://piccounter-philippschmitt.rhcloud.com/?lat=52.520732&lon=13.409537&latRes=0.00015&lonRes=0.0003&flickrKey=60d03369d3e92b4578c8f2df2de5af66 | |
render | |
for each particle | |
x, y = particle.position | |
color = sample( colorMap, x, y ) | |
noise = sample( noiseMap, x, y ) | |
angle = noise * PI * 2 | |
particle.velocity.add( cos(angle), sin(angle) ) |
All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.
elem.offsetLeft
, elem.offsetTop
, elem.offsetWidth
, elem.offsetHeight
, elem.offsetParent
elem.clientLeft
, elem.clientTop
, elem.clientWidth
, elem.clientHeight
elem.getClientRects()
, elem.getBoundingClientRect()
/*! | |
* quantize.js Copyright 2008 Nick Rabinowitz. | |
* Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php | |
*/ | |
// fill out a couple protovis dependencies | |
/*! | |
* Block below copied from Protovis: http://mbostock.github.com/protovis/ | |
* Copyright 2010 Stanford Visualization Group | |
* Licensed under the BSD License: http://www.opensource.org/licenses/bsd-license.php |
license: gpl-3.0 |