Skip to content

Instantly share code, notes, and snippets.

diff --git a/Open-ILS/src/eg2/src/app/share/grid/grid.ts b/Open-ILS/src/eg2/src/app/share/grid/grid.ts
index 6aeddab851e..65580b13ff2 100644
--- a/Open-ILS/src/eg2/src/app/share/grid/grid.ts
+++ b/Open-ILS/src/eg2/src/app/share/grid/grid.ts
@@ -1466,6 +1466,11 @@ export class GridDataSource {
checkAllRetrieved(pager: Pager, idx: number) {
if (this.allRowsRetrieved) { return; }
+ if (pager.resultCount > 0) {
+ if (!this.data.includes(undefined)) {
@gmcharlt
gmcharlt / patch.diff
Created February 13, 2023 15:40
Diff for Evergreen LP#1970476 that restores the functionality of the scope selector
diff --git a/Open-ILS/src/templates-bootstrap/opac/parts/advanced/search.tt2 b/Open-ILS/src/templates-bootstrap/opac/parts/advanced/search.tt2
index f22c7ff3d5..45bb763aec 100755
--- a/Open-ILS/src/templates-bootstrap/opac/parts/advanced/search.tt2
+++ b/Open-ILS/src/templates-bootstrap/opac/parts/advanced/search.tt2
@@ -86,7 +86,7 @@
<div [% IF adv_chunk.js_only %] id='adv_chunk_[% adv_chunk.adv_special %]' class='hidden' [% END %]>
<strong><label for="[% adv_chunk.id %]"> [% adv_chunk.adv_label %] </label></strong>
[% IF adv_chunk.adv_special == "lib_selector"; PROCESS "opac/parts/org_selector.tt2"; INCLUDE build_org_selector show_loc_groups=0 show_lassos=0 id=adv_chunk.id %]
- [% ELSIF adv_chunk.adv_special == "scope_selector"; PROCESS "opac/parts/org_selector.tt2"; INCLUDE build_scope_selector show_loc_groups=1 show_lassos=1 id=adv_chunk.id %]
+ [% ELSIF adv_chunk.adv_special == "scope_selector"; PROCESS "opac/parts/o
@gmcharlt
gmcharlt / stat_and_lstat_and_underscores_oh_my.pl
Last active July 11, 2019 21:56
Perl, sometimes continuing to break my brain since 1994
#!/usr/bin/perl
use strict;
use warnings;
use feature qw(say);
use File::Path qw'remove_tree';
system 'mkdir -p foo/bar/baz';
system 'cd foo && ln -s bar quux';
@gmcharlt
gmcharlt / unofficial_lbor_article_vii_draft.md
Last active January 26, 2019 19:29
UNOFFICIAL draft of proposed article VII to Library Bill of Rights

Library Bill of Rights, Article VII

All people, regardless of origin, age, background, or views, possess a right to privacy and confidentiality in their library use. Libraries should advocate for, educate about, and protect people’s privacy, safeguarding all library use data, including personally identifiable information. [*]

[*]: NISO Privacy Principles defines "Personally identifiable information (PII)” and “personal information” as “Data that can be used—on their own or in combination with other data—to identify, contact, or locate a single person,

@gmcharlt
gmcharlt / twitter-hide-reply-to-context.css
Created March 31, 2017 13:05
Reclaim some vertical space on twitter dot com
@-moz-document domain("twitter.com") {
.ReplyingToContextBelowAuthor {
display: none;
}
}
@gmcharlt
gmcharlt / lwp_simple_error.txt
Created February 22, 2017 16:07
LWP::Simple -- denied!
$ curl -A 'LWP::Simple/1.1' https://www.loc.gov/marc/relators/relacode.html
<!DOCTYPE html>
<!--[if lt IE 7]> <html class="no-js ie6 oldie" lang="en-US"> <![endif]-->
<!--[if IE 7]> <html class="no-js ie7 oldie" lang="en-US"> <![endif]-->
<!--[if IE 8]> <html class="no-js ie8 oldie" lang="en-US"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en-US"> <!--<![endif]-->
<head>
<title>Access denied | www.loc.gov used Cloudflare to restrict access</title>
<meta charset="UTF-8" />
...
@gmcharlt
gmcharlt / icann_monitor.txt
Created December 29, 2016 14:48
seems legit
$ whois icann-monitor.org
Domain Name: ICANN-MONITOR.ORG
Domain ID: D402200000001096932-LROR
WHOIS Server:
Referral URL: http://www.enom.com
Updated Date: 2016-12-29T13:58:22Z
Creation Date: 2016-12-28T20:19:57Z
Registry Expiry Date: 2017-12-28T20:19:57Z
@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;
@gmcharlt
gmcharlt / sru_pqf_naf_saf_oh_my.md
Last active October 27, 2020 17:05
Using SRU to fetch LC NAF and SAF authority records modified on a given date

Here is a spell for retrieving MARCXML records from the Library of Congress's SRU server. It relies on the fact that IndexData-written SRU servers (such as Metaproxy) offer a convenient way to pass Z39.50 PQF query strings, so we're not stuck using just the predefined SRU search attributes.

Here's an example of retrieving all NAF records that were last updated on 2016-05-16:

http://lx2.loc.gov:210/NAF?operation=searchRetrieve&amp;version=1.1&amp;queryType=pqf&amp;query=@attr 5=1 @attr 1=1012 2016-05-16&amp;recordSchema=marcxml&amp;maximumRecords=20
@gmcharlt
gmcharlt / koha-ldap-server.pl
Created February 27, 2015 17:16
Proof-of-concept LDAP server that supports authentication-via-bind-only against a Koha patron database.
#!/usr/bin/perl
# Proof-of-concept LDAP server that supports
# authentication-via-bind-only against a Koha
# patron database.
use strict;
use warnings;
package KohaLDAPServer;