Skip to content

Instantly share code, notes, and snippets.

@troubleshooter
troubleshooter / dnsupdater.sh
Created August 16, 2025 18:52
Dynamic DNS updater script for use with Linode.com's DNS API
#!/bin/sh
# A shell script to update Linode's DNS with WAN IPs
#
# For use with version 4 of Linode's DNS API
# Requires:
# * dig
# * nc
# * notify-send
# * rsyslog/syslog
@troubleshooter
troubleshooter / merge-pdf-ghostscript.md
Created May 25, 2021 20:40 — forked from brenopolanski/merge-pdf-ghostscript.md
Merge multiple PDFs using Ghostscript

A simple Ghostscript command to merge two PDFs in a single file is shown below:

gs -dNOPAUSE -sDEVICE=pdfwrite -sOUTPUTFILE=combine.pdf -dBATCH 1.pdf 2.pdf

Install Ghostscript:

Type the command sudo apt-get install ghostscript to download and install the ghostscript package and all of the packages it depends on.

@troubleshooter
troubleshooter / irc.md
Created May 25, 2021 16:18 — forked from xero/irc.md
irc cheat sheet

IRC Reference

Not intended as a guide for newbies, more like a "cheat sheet" for the somewhat experienced IRC user, especially one who wields some power over a channel.

The Basics

  • /join #channel
    • Joins the specified channel.
  • /part #channel
  • Leaves the specified channel.
@troubleshooter
troubleshooter / rtftomarkdown.rb
Created November 25, 2017 21:09 — forked from ttscoff/rtftomarkdown.rb
Convert RTF/DOC files to Markdown via Textutil
#!/usr/bin/ruby
=begin
Usage: rtftomarkdown.rb FILENAME.rtf
Uses textutil, available on Mac only (installed by default)
Outputs to STDOUT
Notes:
Links are replaced with Markdown references (duplicate links combined).
@troubleshooter
troubleshooter / postgres-cheatsheet.md
Created November 25, 2017 20:59 — forked from Kartones/postgres-cheatsheet.md
PostgreSQL command line cheatsheet

PSQL

Magic words:

psql -U postgres

Some interesting flags (to see all, use -h):

  • -E: will describe the underlaying queries of the \ commands (cool for learning!)
  • -l: psql will list all databases and then exit (useful if the user you connect with doesn't has a default database, like at AWS RDS)