Skip to content

Instantly share code, notes, and snippets.

View rjw1's full-sized avatar

bob rjw1

View GitHub Profile
@rjw1
rjw1 / pub.sh
Created June 1, 2019 09:15
roseandcrown hyphens
#!/bin/bash
for pub in `cat rose-and-crown.md`
do
echo ${pub}
echo ${pub}.uk
dig +short ${pub}.uk
echo www.${pub}.uk
dig +short www.${pub}.uk
echo ${pub}.co.uk
dig +short ${pub}.co.uk

Keybase proof

I hereby claim:

  • I am rjw1 on github.
  • I am rjw1 (https://keybase.io/rjw1) on keybase.
  • I have a public key ASA6rLDKm-6Wxq2_ZOwHST79_VAEtt2piPnFAETwFFn2vAo

To claim this, I am signing this object:

commit b757cb9c49965e0ef55c9e93726eb4d929c0c8c5
Author: Sam J Sharpe <sam.sharpe@digital.cabinet-office.gov.uk>
Date: Mon Mar 10 12:15:08 2014 +0000
Bash logic is hard
It turns out that if you glob for files into an array and your glob has no matches,
then your array contains one element - the glob pattern.
This catches this as an additional success
not ok 26 - ...but not if we ask for them not to be
# Failed test '...but not if we ask for them not to be'
# at t/usemod.t line 161.
# '<p>This is an <a href="wiki.pl?Extended_Link">Extended Link</a>.</p>
# <p>This is a lower-case <a href="wiki.pl?Extended_Link">extended link</a>.</p>
# <p>This is an <a href="wiki.pl?Extended%2C_Link%2C_With%2C_Commas">Extended, Link, With, Commas</a>.</p>
# <p>This is a <a href="wiki.pl?Extended_Link">titled extended link</a>.</p>
# <p>This is a <a href="wiki.pl?Extended%2C_Link%2C_With%2C_Commas">titled extended link with commas</a>.</p>
# <p>This is a <a href="wiki.pl?Extended_Link_Two">title with leading whitespace</a>.</p>
@rjw1
rjw1 / sshd_config
Created October 1, 2014 10:04
really!
#AuthorizedKeysFile %h/.ssh/authorized_keys
AuthorizedKeysFile %h/.ssh/authorization/authorized_keys
{standard input}: Assembler messages:
{standard input}:354651: Warning: end of file in string; '"' inserted
cc: internal compiler error: Killed (program cc1)
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-4.7/README.Bugs> for instructions.
error building lib/Lucy.o from 'lib/Lucy.c' at /usr/share/perl/5.14/ExtUtils/CBuilder/Base.pm line 177.
-> FAIL Installing Lucy failed. See /home/vagrant/.cpanm/build.log for details.
exec { 'install_elasticsearch':
command => "/usr/bin/dpkg -i /tmp/elasticsearch-1.3.0.deb;/usr/bin/touch /opt/track/elasticsearch",
require => [File['/tmp/elasticsearch-1.3.0.deb'], Package['openjdk-7-jdk']],
creates => '/opt/track/elasticsearch'
}
exec { 'install_elasticsearch':
command => "/usr/bin/dpkg -i /tmp/elasticsearch-1.3.0.deb;/usr/bin/touch /opt/track/elasticsearch",
require => [File['/tmp/elasticsearch-1.3.0.deb'], Package['openjdk-7-jdk']],
creates => '/opt/track/elasticsearch'
}