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
const express = require('express') | |
const router = express.Router() | |
const PDFDocument = require('pdfkit') | |
router.post('/', (req, res) => { | |
const doc = new PDFDocument() | |
let filename = req.body.filename | |
// Stripping special characters | |
filename = encodeURIComponent(filename) + '.pdf' | |
// Setting response to 'attachment' (download). |
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
doctype html | |
html | |
head | |
title= title | |
link(rel='stylesheet', href='https://cdnjs.cloudflare.com/ajax/libs/bootswatch/3.3.6/flatly/bootstrap.min.css') | |
link(rel='stylesheet', href='/stylesheets/style.css') | |
body | |
block content |
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
extends layout | |
block content | |
.row | |
.col-md-8 | |
h1="Create a PDF" | |
form.form-horizontal.well(method="post", action="/pdf") | |
.form-group | |
label.col-md-2.control-label File Name | |
.col-md-10 | |
.input-group |
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
function pdf_merge { | |
join_py="/System/Library/Automator/Combine PDF Pages.action/Contents/Resources/join.py" | |
read "output_file?Name of output file > " | |
"$join_py" -o $output_file $@ && open $output_file | |
} |
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
function pdf_join { | |
join_py="/System/Library/Automator/Combine PDF Pages.action/Contents/Resources/join.py" | |
read -p "Name of output file > " output_file && "$join_py" -o $output_file $@ && open $output_file | |
} |
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
$ sudo apt-get install avahi-daemon | |
$ sudo apt-get install avahi-utils | |
$ avahi-browse --all --resolve | |
beter nog | |
$ avahi-browse --all --resolve -t” | |
dan stopt die wat eerder |
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
MAILTO=xxxx@xxxx.de | |
PATH=$PATH:/usr/local/bin/ | |
*/5 * * * * /usr/local/bin/isTermUp.sh | |
@reboot /usr/local/bin/forever -c /usr/local/bin/coffee ~/node/overheid/anon.coffee >> ~/node/log/overheid.log | |
0 12 * * * /bin/cat ~/node/log/overheid.log | /usr/bin/mail -s "OverheidsEdits Tweets Report" xxx@xxx.de |
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
#!/bin/bash | |
if [[ `wget -q -O - https://terms.vangilst.eu/duits-nederlands/Biomonitoring | /usr/bin/grep "biologische monitoring"` == "" ]]; then /bin/echo "Website down" | /usr/bin/mail -s "terms.vangilst.eu down!" xxx@xxx.de; fi |
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
# Upstart service for term.world node application | |
# Save in /etc/init/termworld.conf | |
description "Term.world node js application" | |
author "Koen van Gilst" | |
start on filesystem or runlevel [2345] | |
stop on shutdown or on runlevel [016] | |
setuid caddy |
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
├── bin binaries with fundamental utilities like cp, ls etc | |
├── boot all files required for succesfull booting process | |
├── dev = "devices" and contains a file representation of all devices | |
├── etc system-wide configuration files | |
├── init contains upstart scripts | |
├── home home directories users | |
├── lib shared libraries for programs in /bin | |
├── lib64 see above, for 64 architecture | |
├── lost+found lost and potentially corrupt files |