Skip to content

Instantly share code, notes, and snippets.

@Opfour
Opfour / hand-modify-pdf.md
Created September 4, 2023 21:25 — forked from senderle/hand-modify-pdf.md
So you want to modify the text of a PDF by hand

So you want to modify the text of a PDF by hand...

If you, like me, resent every dollar spent on commercial PDF tools, you might want to know how to change the text content of a PDF without having to pay for Adobe Acrobat or another PDF tool. I didn't see an obvious open-source tool that lets you dig into PDF internals, but I did discover a few useful facts about how PDFs are structured that I think may prove useful to others (or myself) in the future. They are recorded here. They are surely not universally applicable --
the PDF standard is truly Byzantine -- but they worked for my case.

@Opfour
Opfour / COPYING
Created April 20, 2022 19:27 — forked from frabert/COPYING
Favicons for HN
This is free and unencumbered software released into the public domain.
Anyone is free to copy, modify, publish, use, compile, sell, or
distribute this software, either in source code form or as a compiled
binary, for any purpose, commercial or non-commercial, and by any
means.
In jurisdictions that recognize copyright laws, the author or authors
of this software dedicate any and all copyright interest in the
software to the public domain. We make this dedication for the benefit
#!/bin/bash
timestamp=`date +%Y%m%d`
LOGDIR=/var/log/log.foo
find $LOGDIR -name '*.log' -type f -size +512k | while read logfile
do # the parsing of a line
echo $logfile
newlogfile=$logfile.$timestamp
cp $logfile $newlogfile
cat /dev/null > $logfile
gzip -f -9 $newlogfile
@Opfour
Opfour / git-commit-template.md
Created January 13, 2022 01:44 — forked from lisawolderiksen/git-commit-template.md
Use a Git commit message template to write better commit messages

Using Git Commit Message Templates to Write Better Commit Messages

One of my colleagues shared an article on writing (good) Git commit messages today: How to Write a Git Commit Message. This excellent article explains why good Git commit messages are important, and explains what constitutes a good commit message. I wholeheartedly agree with what @cbeams writes in his article. (Have you read it yet? If not, go read it now. I'll wait.) It's sensible stuff. So I decided to start following the

#!/bin/bash
iatest=$(expr index "$-" i)
#######################################################
# SOURCED ALIAS'S AND SCRIPTS BY zachbrowne.me
#######################################################
# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
@Opfour
Opfour / index.html
Created August 23, 2021 19:07 — forked from ZedYeung/index.html
awesome-k8s
<h1 id="awesome-kubernetes">Awesome-Kubernetes</h1>
<h2 id="awesome-kubernetes-annotations">Copy from https://github.com/ramitsurana/awesome-kubernetes, used for learning</h2>
<p><a href="https://github.com/sindresorhus/awesome"><img src="https://cdn.rawgit.com/sindresorhus/awesome/d7305f38d29fed78fa85652e3a63e154dd8e8829/media/badge.svg" alt="Awesome"></a>
<a href="https://travis-ci.org/ramitsurana/awesome-kubernetes"><img src="https://travis-ci.org/ramitsurana/awesome-kubernetes.svg?branch=master" alt="Build Status"></a>
<a href="https://semaphoreci.com/ramitsurana/awesome-kubernetes"><img src="https://semaphoreci.com/api/v1/ramitsurana/awesome-kubernetes/branches/master/badge.svg" alt="Build Status"></a>
<a href="http://creativecommons.org/licenses/by-nc/4.0/"><img src="https://img.shields.io/badge/License-CC%204.0-brightgreen.svg?style=flat-square" alt="License"></a>
<a href="https://hub.docker.com/r/ramitsurana/awesome-kubernetes"><img src="https://img.shields.io/docker/build/ramitsurana/awesome-kubernet
@Opfour
Opfour / Internet Slang and Emoticons.md
Created August 19, 2021 13:37 — forked from Zenexer/Internet Slang and Emoticons.md
Internet slang, abbreviations, and emoticons

Internet slang and abbreviations

Slang Variations In use? Meaning
|  ||
|| |_
| || || |_ Yes Loss
/s Yes Sarcasm (suffix)
3cool5u 3cool5me Yes "Too cool for you"; from "2cool4u"
420 Yes "Marijuana"
afaik Yes "As far as I know"
afk Yes "Away from keyboard"