Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env node | |
// htmlpdf.js -- Convert HTML to PDF using Google Chrome/Chromium | |
// Usage: | |
// node htmlpdf.js input.html output.pdf | |
// node htmlpdf.js https://google.com output.pdf | |
// | |
// Using Chrome/Chromium via puppeteer provides support for modern web | |
// technologies (CSS grid, etc.) and pixel-perfect rendering. | |
// Thus, this script correctly transforms websites where PhantomJS or wkhtmltopdf fail. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python3 | |
import os | |
import argparse | |
import base64 | |
import mimetypes | |
import re | |
RE = b'src="([^"]*)"' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import math | |
def average_angles(angles): | |
"""Average (mean) of angles | |
Return the average of an input sequence of angles. The result is between | |
``0`` and ``2 * math.pi``. | |
If the average is not defined (e.g. ``average_angles([0, math.pi]))``, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<form class="form-horizontal" id="comment-form" ng-show="CommentAPI.connected"> | |
<fieldset> | |
<legend>Post a comment</legend> | |
<div class="form-group"> | |
<label for="postcomment-homepage" class="col-lg-2 control-label">Homepage</label> | |
<div class="col-lg-10"> | |
<input class="form-control" id="postcomment-homepage" placeholder="Homepage" type="url" | |
maxlength="150" ng-model="comment.homepage"> | |
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let $LANG = 'en_US.UTF-8' | |
let $LC_MESSAGES = 'en_US.UTF-8' | |
set langmenu="en_US.utf-8" | |
set encoding=utf-8 | |
set fileencodings=ucs-bom,utf-8,latin1 | |
" This line should not be removed as it ensures that various options are | |
" properly set to work with the Vim-related packages available in Debian. | |
runtime! debian.vim |