my half-arsed attempt at blogging
Posts tagged geek
Mailman and Googlemail -> Gmail: A three step approach…
Jun 2nd
I thought other listadmins might be having fun with gmail now being available in the UK (rather than “googlemail”, as it has been for a while (despite ‘gmail’ originally being available, back in the days of invitation only)), and thought I’d share my hackish way around this, so listfolks can post from their gmail.com addresses.
It’s not pretty, but works for me — pre-requisite, Mark’s very useful “non-members” script: http://www.msapiro.net/scripts/non_members
- find who you need to work with:
mkdir ~/tmp/gmail && list_lists -b | while read L; do list_members ${L} | grep googlemail > ~/tmp/gmail/${L}; done
- Zap annoucement lists from the files, remove empty files, too.
- Let them post!
/var/lib/mailman/bin$ ls -1 ~/tmp/gmail | while read L; do sed 's/@googlemail.com/@gmail.com/' ~/tmp/gmail/${L} | while read X; do ./non_members --list=${L} --filter=accept --add ${X} --verbose; done; done
(nb: the path (/var/lib/mailman/bin) is from a Debian machine — Mailman installed via packages — and in my case /var/lib/mailman/bin being in
my ${PATH} — so replace those as appropriate in your cases.)
Which seems to have done the trick.
arpinfo
May 20th
Ever wanted to know who the OEM/Supplier/Manufacturer of network devices attached to a machine were?
I did. And couldn’t see anyone else’s script to steal, so here’s a really ugly way to do it
# arpinfo:
# pull hardware info from the arp() table
#
# Copyright (c) 2010 Adam McGreggor. Some rights reserved.
# Email:
#
# $Id:$
#
WEBSOURCE=http://standards.ieee.org/regauth/oui/oui.txt
DOC=/usr/local/doc/oui.txt
curl --silent ${WEBSOURCE} -o "${DOC}"
arp | awk '{print $3}' | awk -F: '{print $1"-"$2"-"$3}' | while read ARP
do
grep $ARP ${DOC}
done
arp
Works for me… although it could do with a tidy-up. As a quick and dirty thing, mind…
Firefox Extensions
Jan 10th
Thought this might double up as a note of the firefox extensions I currently have installed — I’ve tried getting this to script, but, the source file isn’t something I’m over-familiar with, and getting fields to match-up ain’t happening, due to my crapness.
Anyhow, I would appear to have these firefox extensions installed:
- Adblock Plus
- AutoPager
- BetterFlickr
- Better YouTube
- Delicious Bookmarks
- DownloadHelper
- Echofon
- Extended Statusbar
- Fast Video Downloader (with SearchMenu)
- Firebug
- Firefox (default)
- Firefox (en-GB)
- Flagfox
- Flashblock
- Gmail Manager
- Greasefire
- Greasemonkey
- Image Download
- Image Zoom
- Inline Code Finder for Firebug
- is.gd Creator
- JavaScript Options
- keyconfig
- Magic’s Video Downloader
- oldbar
- Password Exporter
- Save Image in Folder [sic]
- ShowIP
- SkipScreen
- TinyUrl Creator
- Ubuntu Firefox Modificiations
- URL Fixer
- VMware Remote Console Plug-In
- Xulrunner (en-GB)
- YesScript
A few of those don’t have links I can identify from the URI.
Want some code that vaguely does this for you?
#!/bin/sh
#
# ffexts:
# list firefox extensions: names and URIs for download/homepage
#
# Copyright (c) 2010 Adam McGreggor. Some rights reserved.
# Email: <adam@amyl.org.uk> Web: <http://blog.amyl.org.uk>
#
# $Id: ffexts 119 2010-01-10 00:38:04Z adam $
#
set -e
MOZDIR=~/.mozilla/firefox
PROFDIR=`ls -lha ${MOZDIR} | grep default | awk '{print $NF}'`
FILE=extensions.rdf
INFILE=${MOZDIR}/${PROFDIR}/${FILE}
OF=~/tmp/ffexts
OUTFILE=~/pseudohome/nas-docs/firefox-extensions-$(date '+%Y%m%d')
# check for existing outfile, as we'll be
# appending; if so, zap it
if [ -e ${OUTFILE} ]; then
rm ${OUTFILE}
fi
# grab the interesting bits from the RDF file
for K in name homepageURL
do
# nice fix-up, eh?
grep "NS1:${K}" ${INFILE} | sed -e "s/NS1:${K}=//" \
-e 's/"//g' -e 's/>//' \
-e 's/^[ \t]*//' | sort | uniq > ${OF}-${K}
# using wc here is entirely optional ![]()
wc -l ${OF}-${K}
# append
cat ${OF}-${K} >> ${OUTFILE}
done
Twitter lists
Oct 28th
As my reader will know, I’m rather fond of lists. For a while, i’ve held back against Twitter Lists, not really seeing the point of them: my current client, Tweetdeck, after all, has categories for me; I rarely use the twitter website, and my pytwerp config/template is easy to grep, if I need to.
But, erm, yeah. I’ve made a start, and given how shit my memory is, I thought I’d explain (to you, and me) how I’ve categorized:
- @adamamyl/foodies — people who write about food. Or like food
- @adamamyl/burners — burners. as in burningman/nowhere/decompressions. fucking hippies
- @adamamyl/uber-kewl-kids — mainly shops/products I really like
- @adamamyl/lawyers — i seem to follow a few of ‘em: let’s put ‘em all together
- @adamamyl/academics — self-explanatory, really
- @adamamyl/public-life — better than “slebs”
- @adamamyl/music-folks — people in the music industry, in one way or another
- @adamamyl/technologists — people who fiddle with tech, new products, that sort of thing
- @adamamyl/mafia — people who (will) run things.
- @adamamyl/web-folks — people involved in web stuff and maybe social media, may include ruby people, as they’re not proper geeks
- @adamamyl/usual-suspects — child-eating, crack-dealing refusniks (hi Stef!) who still won’t give up.
- @adamamyl/politicos — those with political interests/aspirations. can also include current affairs/news
- @adamamyl/representatives — people who’ve been elected, usually
- @adamamyl/geeks — lovely people, really
