$ wkhtmltopdf https://www.google.fr output.pdf
Loading pages (1/5)
Error: Failed loading page https://www.google.fr (sometimes it will work just to ignore this error with --ignore-load-errors)
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 | |
sed -i -e 's/[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}/G.D.P.R/g' some.log |
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
for emails in `mailq | awk '/^[0-9A-F][0-9A-F]/{print $1}'`; do postcat -q $emails;done |
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
# Compressing to EBook quality (between "screen" and "preprocess") | |
gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/ebook -dNOPAUSE -dQUIET -dBATCH -sOutputFile=output.pdf input.pdf | |
# Black and white output, with custom resolution | |
gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/default -dCompressFonts=true -r150 -dNOPAUSE -dQUIET -dBATCH -sColorConversionStrategy=Gray -dProcessColorModel=/DeviceGray -sOutputFile=output.pdf input.pdf |
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 | |
# Small files (64KB) | |
dd if=/dev/zero of=./dsync64KB.img bs=64 count=1000 oflag=dsync 2>&1|tee dsync-test-1-64KB.log | |
# Medium files (8MB) | |
dd if=/dev/zero of=./dsync8MB.img bs=8k count=1000 oflag=dsync 2>&1|tee dsync-test-2-8MB.log | |
# Big files (128MB) | |
dd if=/dev/zero of=./dsync128MB.img bs=128k count=1000 oflag=dsync 2>&1|tee dsync-test-3-128MB.log |
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
// ref. https://pauladamsmith.com/blog/2016/07/go-modify-slice-iteration.html | |
y := x[:0] | |
for _, n := range x { | |
if n.property !=42 { | |
y = append(y, n) | |
} | |
} | |
// If some further sorting should be done, requires Go 1.8+ | |
// https://stackoverflow.com/a/42872183/634275 |
sudo apt-get install libmagickwand-dev
go get -u gopkg.in/gographics/imagick.v2/imagick
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
<?php | |
error_reporting(E_ALL); | |
ini_set('display_errors', 1); | |
echo password_hash("test", PASSWORD_ARGON2I) . "\n"; | |
// expected output: | |
// $argon2i$v=19$m=1024,t=2,p=2$Si9YUTV5Mk50clRPckJmNg$iiaHUvfJpx2fwVJLUDr2J0XePR31gxxIu5VHlgFMA/k |