Skip to content

Instantly share code, notes, and snippets.

View ubermichael's full-sized avatar

Michael Joyce ubermichael

View GitHub Profile
@notriddle
notriddle / README.md
Last active May 6, 2023 08:24
The hub workflow

How to use hub's PAT for user accounts

$ git config --global hub.protocol https
$ cat ~/.config/hub
github.com:
- user: notriddle
  oauth_token: [CENSORED]
  protocol: https
$ cat > ~/.netrc
@gmcharlt
gmcharlt / marc_marc8toutf8.pl
Created October 23, 2016 23:14
little Perl script to convert MARC21 records from MARC-8 to UTF-8
#!/usr/bin/perl
# Convert MARC21 records from MARC-8 to UTF-8
#
# Usage:
# marc_marc8toutf8.pl < MARC8.mrc > UTF8.mrc
use strict;
use warnings;
@joewiz
joewiz / strip-diacritics.xq
Last active October 22, 2022 14:42
Strip diacritics, with XQuery
xquery version "3.1";
declare function local:strip-diacritics($string as xs:string) as xs:string {
$string
=> normalize-unicode("NFD")
=> replace("\p{IsCombiningDiacriticalMarks}", "")
};
declare function local:inspect-diacritics($string as xs:string) as element() {
let $normalized := normalize-unicode($string, "NFD")
@gruber
gruber / make_bookmarklet.pl
Last active May 5, 2024 21:11
JavaScript Bookmarklet Builder
#!/usr/bin/env perl
#
# http://daringfireball.net/2007/03/javascript_bookmarklet_builder
use strict;
use warnings;
use URI::Escape qw(uri_escape_utf8);
use open IO => ":utf8", # UTF8 by default
":std"; # Apply to STDIN/STDOUT/STDERR
@bryangreen
bryangreen / Inflector.php
Last active October 24, 2020 00:50
Twig Inflector Extension - For plural and singular English words
<?php
/**
* ReadySetData 2009-2013
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the