start
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| start [2024/01/28 15:03] – [Building packages from later versions of Debian for earlier releases] abeverley | start [2026/06/03 11:48] (current) – abeverley | ||
|---|---|---|---|
| Line 24: | Line 24: | ||
| debuild -uc -us | debuild -uc -us | ||
| - | References: | + | ==== Example: building openarc package from experimental ==== |
| + | |||
| + | Add experimental sources to ''/ | ||
| + | |||
| + | deb-src http:// | ||
| + | |||
| + | apt-get build-dep openarc | ||
| + | apt-get source openarc | ||
| + | cd openarc-1.0.0~beta3+dfsg/ | ||
| + | # Download additional patches | ||
| + | cd debian/ | ||
| + | wget https:// | ||
| + | wget https:// | ||
| + | wget https:// | ||
| + | wget https:// | ||
| + | # Apply | ||
| + | cd ../.. | ||
| + | patch -p1 < debian/ | ||
| + | patch -p1 < debian/ | ||
| + | patch -p1 < debian/ | ||
| + | patch -p1 < debian/ | ||
| + | dch --bpo # Add letter to suggested version | ||
| + | dpkg-source --commit | ||
| + | debuild -uc -us | ||
| + | |||
| + | ==== References ==== | ||
| https:// | https:// | ||
| Line 30: | Line 55: | ||
| Versioning info: https:// | Versioning info: https:// | ||
| + | |||
| + | ===== Building Debian packages of Perl modules ===== | ||
| + | |||
| + | On production servers, I much prefer to use Perl modules from Debian repositories, | ||
| + | |||
| + | Sometimes a Perl module is either not available in the main Debian repositories, | ||
| + | |||
| + | ===== Disk performance tests ===== | ||
| + | |||
| + | See https:// | ||
| + | |||
| + | Test for all-round read/write (worst performance): | ||
| + | |||
| + | fio --name TEST --eta-newline=5s --filename=fio-tempfile.dat --rw=randrw --size=500m --io_size=10g --blocksize=4k --ioengine=libaio --fsync=1 --iodepth=1 --direct=1 --numjobs=1 --runtime=60 --group_reporting | ||
| + | |||
| + | Sequential read: | ||
| + | |||
| + | fio --name TEST --eta-newline=5s --filename=fio-tempfile.dat --rw=read --size=500m --io_size=10g --blocksize=1024k --ioengine=libaio --fsync=10000 --iodepth=32 --direct=1 --numjobs=1 --runtime=60 --group_reporting | ||
| + | |||
| + | Sequential write: | ||
| + | |||
| + | fio --name TEST --eta-newline=5s --filename=fio-tempfile.dat --rw=write --size=500m --io_size=10g --blocksize=1024k --ioengine=libaio --fsync=10000 --iodepth=32 --direct=1 --numjobs=1 --runtime=60 --group_reporting | ||
| + | |||
| + | Random read: | ||
| + | |||
| + | fio --name TEST --eta-newline=5s --filename=fio-tempfile.dat --rw=randread --size=500m --io_size=10g --blocksize=4k --ioengine=libaio --fsync=1 --iodepth=1 --direct=1 --numjobs=1 --runtime=60 --group_reporting | ||
| ===== JSON Web Tokens with Perl ===== | ===== JSON Web Tokens with Perl ===== | ||
| Line 41: | Line 92: | ||
| # Maximum width 400px | # Maximum width 400px | ||
| mogrify -resize ' | mogrify -resize ' | ||
| + | |||
| + | ===== Comparing and normalising documents ===== | ||
| + | |||
| + | Use this to compare PDF and word documents: | ||
| + | |||
| + | * Same the word document as plain text | ||
| + | * Use '' | ||
| + | |||
| + | Use this Perl script to normalise each file: | ||
| + | |||
| + | my $str = do { local $/; < | ||
| + | # Strip paragraph numbers | ||
| + | $str =~ s/ | ||
| + | # Remove wrapped lines that are not paragraph separators | ||
| + | $str =~ s/ | ||
| + | # Strip space at beginning of lines | ||
| + | $str =~ s/^\h+//mg; | ||
| + | # Normalise paragraph breaks | ||
| + | $str =~ s/ | ||
| + | |||
| + | Compare both files using '' | ||
| ===== Using Overlay (OpenStreetMap) ===== | ===== Using Overlay (OpenStreetMap) ===== | ||
| [[overlay|Using Overlay to extract data from OpenStreetMap]] | [[overlay|Using Overlay to extract data from OpenStreetMap]] | ||
| + | |||
| + | ===== Quick and dirty string dumping in Perl ===== | ||
| + | |||
| + | From https:// | ||
| + | |||
| + | A non-obvious feature of sprintf can help here: sprintf(' | ||
| + | |||
| + | sprintf(' | ||
| + | sprintf(' | ||
| + | sprintf(' | ||
| + | |||
| + | Don't like decimal character codes? Use hex instead: | ||
| + | |||
| + | sprintf(' | ||
| + | sprintf(' | ||
| + | sprintf(' | ||
| + | |||
| + | Don't like dots? Use whatever separator you want: | ||
| + | |||
| + | sprintf(' | ||
| ===== Using iptables and PHP to create a captive portal ===== | ===== Using iptables and PHP to create a captive portal ===== | ||
start.1706454189.txt.gz · Last modified: by abeverley
