A very basic regex-based Markdown parser. Supports the
following elements (and can be extended via Slimdown::add_rule()
):
- Headers
- Links
- Bold
%!TEX TS-program = xelatex | |
\documentclass[12pt]{scrartcl} | |
% The declaration of the document class: | |
% The second line here, i.e. | |
% \documentclass[12pt]{scrartcl} | |
% is a standard LaTeX document class declaration: | |
% we say what kind of document we are making in curly brackets, | |
% and specify any options in square brackets. |
## !! This snippet has been updated, but not tested in practice. It should work, please check / leave comments in case it doesn't. !! ## | |
# originally from https://groups.google.com/a/webmproject.org/group/webp-discuss/browse_thread/thread/196ac4ea705688d8 | |
<IfModule mod_rewrite.c> | |
# TODO: don't forget to put | |
# AddType image/webp .webp | |
# in your mods-available/mime.conf | |
# (though this is optional because we're setting | |
# the mime type manually in the RewriteRule) |
const PHANTOM_FUNCTION_PREFIX = '/* PHANTOM_FUNCTION */'; | |
var page = require('webpage').create(); | |
page.onConsoleMessage = function(msg) { | |
if (msg.indexOf(PHANTOM_FUNCTION_PREFIX) === 0) { | |
eval('(' + msg + ')()'); | |
} else { | |
console.log(msg); | |
} |
<div class="privacy-policy"> | |
<h1>Privacy Policy</h1> | |
<section id="privacy-information-we-collect"> | |
<h3>What information do we collect?</h3> | |
<p>We collect information from you when you register on our site, place an order, subscribe to our newsletter, respond to a survey or fill out a form.</p> | |
<p>When ordering or registering on our site, as appropriate, you may be asked to enter your: name, e-mail address, mailing address, phone number, credit card information or social security number. You may, however, visit our site anonymously. | |
Google, as a third party vendor, uses cookies to serve ads on your site. Google's use of the DART cookie enables it to serve ads to your users based on their visit to your sites and other sites on the Internet. Users may opt out of the use of the DART cookie by visiting the Google ad and content network privacy policy.</p> | |
</section> |
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Upload your files</title> | |
</head> | |
<body> | |
<form enctype="multipart/form-data" action="upload.php" method="POST"> | |
<p>Upload your file</p> | |
<input type="file" name="uploaded_file"></input><br /> | |
<input type="submit" value="Upload"></input> |
A very basic regex-based Markdown parser. Supports the
following elements (and can be extended via Slimdown::add_rule()
):
<!doctype html> | |
<title>Site Maintenance</title> | |
<style> | |
body { text-align: center; padding: 150px; } | |
h1 { font-size: 50px; } | |
body { font: 20px Helvetica, sans-serif; color: #333; } | |
article { display: block; text-align: left; width: 650px; margin: 0 auto; } | |
a { color: #dc8100; text-decoration: none; } | |
a:hover { color: #333; text-decoration: none; } | |
</style> |
<?php | |
/** | |
* I had to parse an XLSX spreadsheet (which should damn well have been a CSV!) | |
* but the usual tools were hitting the memory limit pretty quick. I found that | |
* manually parsing the XML worked pretty well. Note that this, most likely, | |
* won't work if cells contain anything more than text or a number (so formulas, | |
* graphs, etc ..., I don't know what'd happen). | |
*/ |
// Viewport | |
// | |
// phantom.js viewport.js http://google.com 400 | |
var args = require("system").args; | |
var url = args[1]; | |
var width = args[2]; | |
var height = args[3]; |