Skip to content

Instantly share code, notes, and snippets.

@richardneish
richardneish / HTMLUnit.pl
Created August 2, 2013 13:25
Command line wrapper around the HTML::Lint module. I hacked this up because I couldn't find the included weblint script. Takes HTML from a filename specified on the command line, or from STDIN if the filename is '-'.
#!/usr/bin/perl -w
use strict;
use HTML::Lint;
die "Usage: $0 [<FILENAME> | -]" unless defined $ARGV[0];
my $lint = HTML::Lint->new;
$lint->only_types( HTML::Lint::Error::STRUCTURE );
@richardneish
richardneish / commits_for_issue.pl
Created January 22, 2014 10:55
Perl script to get JIRA details from a git commit in Atlassian Stash using the REST API documented at https://developer.atlassian.com/static/rest/stash/2.9.4/stash-jira-integration-rest.html and the Perl JSON::PP module.
#!/usr/bin/perl -w
use strict;
use lib "./lib"; # Required if you have JSON.PP installed locally. This makes the script self-contained.
use JSON::PP;
my $config = require "config.pl"; # Your private configuration - username / password / Stash URL.
use Data::Dumper;
use POSIX qw(strftime);
sub usageExit() {
die "Usage: commits_for_issue <issue key> ...";
@richardneish
richardneish / git-all
Created March 18, 2014 09:31
Scripts to operate on a set of Git repositories from the parent directory
#!/bin/bash
BASE_DIR=$(dirname $0)
for d in *
do
"${BASE_DIR}/git-do" "${d}" $*
done
@richardneish
richardneish / Vimium_custom_key_mappings.txt
Created June 25, 2014 12:32
Make Vimium behave a bit more like Vimperator
" Make Vimium behave a bit more like Vimperator
unmap d
unmap x
map d removeTab
unmap u
unmap X
map u restoreTab
@richardneish
richardneish / Keymapings for IdeaVim.md
Last active August 29, 2015 14:04
Keymapings for IdeaVim

The following keys are mapped by the IdeaVim keymap and need to be remapped back to the IntelliJ default behaviour (for me).

  • Ctrl-Q - Quick Documentation
  • Ctrl-B - Navigate to Definition

Keybase proof

I hereby claim:

  • I am richardneish on github.
  • I am richardneish (https://keybase.io/richardneish) on keybase.
  • I have a public key whose fingerprint is FDA1 038B 8741 4449 DC9C 82AD F9D1 70DC AD2A FA80

To claim this, I am signing this object:

/**
* Hello, CSS
*/
* {
background: #f06;
background: linear-gradient(45deg, #f06, yellow);
min-height: 100%;
}
@richardneish
richardneish / sync_pics
Created January 17, 2016 10:36
Script to syncronize pictures between Synology NAS and local
#!/bin/sh
REMOTE=/mnt/photo/
LOCAL=/home/richard/Pictures/
# TODO: Scan a "deleted items" local folder and use that
# to remove remote items.
# From local to remote first to get any modifications.
rsync \