Skip to content

Instantly share code, notes, and snippets.

View realflash's full-sized avatar

Ian Gibbs realflash

  • Attono Limited
  • London
View GitHub Profile
@realflash
realflash / Numberplate1.ppd
Created March 3, 2022 10:55
PPD file for an HP P1102w laser printer with added UK number plate page size
*PPD-Adobe: "4.3"
*%%%% PPD file for HP LaserJet Professional p1102 with CUPS.
*%%%% Created by the CUPS PPD Compiler CUPS v2.3.1.
*% (c) 2008 Copyright HP Development Company, LP
*FormatVersion: "4.3"
*FileVersion: "3.20.11"
*LanguageVersion: English
*LanguageEncoding: ISOLatin1
*PCFileName: "hp-laserjet_professional_p1102.ppd"
*Product: "(HP LaserJet Professional p1102 Printer)"
@realflash
realflash / run_personal
Created March 15, 2018 09:39
Run multiple dropboxes on Linux, and restart them if they exit.
#!/bin/bash
# CREATE THIS AS $HOME/bin/dropbox_personal/run
dropbox=".dropbox_personal"
HOME="/home/$USER"
if ! [ -d "$HOME/$dropbox" ]
then
mkdir "$HOME/$dropbox" 2> /dev/null
ln -s "$HOME/.Xauthority" "$HOME/$dropbox/" 2> /dev/null
fi
HOME="$HOME/$dropbox"
@realflash
realflash / send_smsbroadcast.pl
Created September 11, 2017 05:25
Perl interface to smsbroadcast.co.uk
#!/usr/bin/perl -w
use strict;
use LWP::UserAgent;
use URI;
use Math::Round;
### Set these
my $auth_data = { 'username' => 'user',
'password' => 'password' };
@realflash
realflash / check_template.pl
Created December 29, 2016 07:19
Nagios perl template plugin
#!/usr/bin/perl -w
use strict;
use lib "/usr/lib/nagios/plugins"; # Debian
use lib "/usr/local/nagios/libexec"; # something else
use utils qw($TIMEOUT %ERRORS &print_revision &support &usage); # Requires utils.pm to be in one of the two directories above
use Getopt::Long qw(:config no_ignore_case);
# Predeclare subroutines
sub print_usage ();
@realflash
realflash / main.php
Created July 4, 2016 14:24 — forked from cce/main.php
Wordpress Extended XML-RPC API (slightly patched)
<?php
/*
Plugin Name: Extended API
Plugin URI: http://www.michaelgrosser.com
Description: This makes all of the common WordPress functions available via XML RPC rather than having to use pre-defined WP XML-RPC methods.
Author: Michael Grosser
Version: 0.5
Author URI: http://www.michaelgrosser.com
*/