- Install QPDF (http://qpdf.sourceforge.net/)
choco install qpdf
- Encrypt single PDF file (http://qpdf.sourceforge.net/files/qpdf-manual.html#ref.encryption-options)
choco install qpdf
/* ==UserStyle== | |
@name Google Analytics color fixer | |
@namespace github.com/openstyles/stylus | |
@version 1.0.0 | |
@description Swaps the default blue-based palette with a proper one. Thanks to https://learnui.design/tools/data-color-picker.html for the idea & color selection | |
@author You | |
@updateURL https://gist.githubusercontent.com/bre7/a0fb9886e8b4251cc1f69274fd0af96f/raw/google.analytics.color.fixer.user.css | |
@preprocessor stylus | |
==/UserStyle== */ |
As a developer, it bothers me when someone sends me a large pdf file compared to the number of pages. Recently, I recieved a 12MB scanned document for just one letter-sized page... so I got to googlin, like I usually do, and found ghostscript!
to learn more abot ghostscript (gs): https://www.ghostscript.com/
What we are interested in, is the gs command line tool, which provides many options for manipulating PDF, but we are interested in compressign those large PDF's into small yet legible documents.
credit goes to this answer on askubuntu forum: https://askubuntu.com/questions/3382/reduce-filesize-of-a-scanned-pdf/3387#3387?newreg=bceddef8bc334e5b88bbfd17a6e7c4f9
// Source: Another gist, will update if I can get the link | |
// Replace # with the first letter of the function | |
["#","webkit#","moz#","ms#","o#"].reduce(function(p, v) { return window[v + p] || p; }, "#FUNCTION_NAME"); | |
// E.g. requestAnimationFrame (vendor prefix not needed anymore) | |
["r","webkitR","mozR","msR","oR"].reduce(function(p, v) { return window[v + p] || p; }, "equestAnimationFrame"); |
#!/usr/bin/env bash | |
# | |
# Author: Stefan Buck | |
# License: MIT | |
# https://gist.github.com/stefanbuck/ce788fee19ab6eb0b4447a85fc99f447 | |
# | |
# | |
# This script accepts the following parameters: | |
# | |
# * owner |
import Vapor | |
/// Services files from the public folder. | |
public final class FileMiddlewareWithCache: Middleware, Service { | |
/// The public directory. | |
/// note: does _not_ end with a slash | |
let publicDirectory: String | |
public var webTypes = [MediaType]() |
https://solarianprogrammer.com/2017/04/15/install-wsl-windows-subsystem-for-linux/ (Update: There's no need to enable "Developer Mode" in Windows 10 anymore since "Windows Subsystem for Linux" is no longer in beta)
https://solarianprogrammer.com/2017/04/19/getting-started-swift-windows-subsystem-linux/
import Foundation | |
import Vapor | |
/// Logs all requests that pass through it. | |
final class LogMiddleware: Middleware, Service { | |
let log: Logger | |
/// Creates a new `LogMiddleware`. | |
init(log: Logger) { self.log = log } |