Skip to content

Instantly share code, notes, and snippets.

View uogbuji's full-sized avatar

Uche Ogbuji uogbuji

View GitHub Profile
@uogbuji
uogbuji / pixelbook-dev-setup.md
Last active January 4, 2025 22:10 — forked from cassiozen/pixelbook-dev-setup.md
Notes on setting up Pixelbook for development

Pixelbook or Pixel Slate Setup

Partly updated June 2023

General caution: Chrome OS is a secure OS by design, but this has at least one key consequence. If you change your Google account password, you will still be required to enter the old password the next time you access each Chrome OS device. Devices are encrypted with that password, so the OS needs to decrypt using the old password then re-encrypt using the new one. If you forget your old password you will lose access to your Chrome OS device data. As always, make sure you keep backups up to date.

Fast User Switching

If you have multiple Chrome OS accounts (Say, work and play), you can quickly sitch between them without logging out:

Osi Ogbuji, 18, part of the DenLug Lego builder’s club, demonstrates his remote-control Lego truck that can pick up small objects. Caption: Osi Ogbuji, 18, part of the DenLug Lego builder’s club, demonstrates his remote-control Lego truck that can pick up small objects.

By David Gilbert, from "Oktoberfest offers authentic fun" in The Littleton Independent

To query LlewBot, tweet along the following lines:

@LlewBot, does @denverlibrary have The Hobbit?

The full list of recognized library twitter handles is below below. Queries are addressed by first looking up Google Books to match title to ISBN, and then looking for candidate ISBNs in the target library's site on the Library.Link network. Please note that LlewBot only searches for books at present. For further enquiries please e-mail [email protected].

@akroninpl
@alexlibrarypl
@uogbuji
uogbuji / all_windows_monitor_switch
Created January 11, 2017 01:50
Linux tool to move all windows from one monitor to another in a multi-monitor config
#!/usr/bin/env python3
#Based on script 2 from http://askubuntu.com/questions/597884/swap-windows-between-screens-in-dual-screen-mode/598038#598038
import subprocess
import sys
vec = sys.argv[1]
def get(cmd):
return subprocess.check_output(["/bin/bash", "-c", cmd]).decode("utf-8")
@uogbuji
uogbuji / code1.md
Last active November 3, 2016 18:20
UXpath MARC 20161103
$ microx --expr "/collection/record/datafield[@tag='245']/subfield[@code='a']" test/resource/GW_bf_test10.mrx 
<subfield code="a">The Medieval mind</subfield>
<subfield code="a">The Chinese bubble</subfield>
<subfield code="a">Zhu fu</subfield>
<subfield code="a">Persuasion :</subfield>
<subfield code="a">Wearing hijab</subfield>
<subfield code="a">Inside Mecca</subfield>
<subfield code="a">Alien quadrilogy</subfield>
Erich Kästners Das doppelte Lottchen /
@uogbuji
uogbuji / uxpath.md
Last active July 10, 2023 14:54
MicroXPath Grammar

MicroXPath outline

MicroXPath is based on XPath 1, except for sequences, borrowed from XPath 2. MicroXPath adopts this approach. The results of all MicroXPath expressions are sequences.

Sequences

MicroXPath provides a syntax for creating sequences, borrowing from XPath 2.0/3.0. The following are the examples of expressions that construct sequences, taken from 3.4.1 of the XPath 3 spec. They have the same semantics as in MicroXPath.

  • (10, 1, 2, 3, 4) results in a sequence of five integers.
@uogbuji
uogbuji / us_state_territory_abbrs.json
Last active March 18, 2016 14:33 — forked from mshafrir/states_hash.json
US states in JSON form #forked #dayjob
{
"AL": "Alabama",
"AK": "Alaska",
"AS": "American Samoa",
"AZ": "Arizona",
"AR": "Arkansas",
"CA": "California",
"CO": "Colorado",
"CT": "Connecticut",
"DE": "Delaware",
>>> from rdflib import graph
>>> g = graph.Graph()
>>> _ = g.parse('http://labs.libhub.org/denverpl/resource/WdnURkYx/', format='rdfa')
>>> len(g)
65
>>> print(g.serialize(format='n3').decode('utf-8'))
@prefix bf: <http://bibfra.me/vocab/lite/> .
@prefix cc: <http://creativecommons.org/ns#> .
@prefix dc: <http://purl.org/dc/terms/> .
@prefix dct: <http://purl.org/dc/terms/> .
@uogbuji
uogbuji / marc-split-memprof.py
Last active August 29, 2015 14:20
Split MARC/XML, used as memory leak test for amara.uxml.tree
#!/usr/bin/env python
'''
Split MARC/XML file
time python -m memory_profiler scratch/marc-split-memprof.py -c 1000 -o /tmp/msplit/split largefile.mrx
'''
import sys
import argparse