Skip to content

Instantly share code, notes, and snippets.

View boutros's full-sized avatar

Petter Goksøyr Åsen boutros

  • Oslo Public Library
  • Oslo
View GitHub Profile
@boutros
boutros / ontologi.dot
Last active July 11, 2018 11:44
Tjenestekatalog ontologi
digraph Ontology {
graph [overlap=voronoi, ranksep=1.3, splines=curved]
node [shape=plaintext fontname="Sans serif" fontsize="8"];
edge [fontname="Sans serif", fontsize="8"];
Lifecycle [label=<
<table border="1" cellborder="0" cellspacing="1" width="100">
<tr><td bgcolor='#e0e0e0'>&lt;Lifecycle&gt;</td><td bgcolor='#e0e0e0'><b>Livsløp</b></td></tr>
<tr><td align="left">&lt;name&gt;</td><td align="left">* <b>Navn</b> (xsd:string)</td></tr>
<tr><td align="left">&lt;description&gt;</td><td align="left"> <b>Beskrivelse</b> (xsd:string)</td></tr>
@boutros
boutros / git.sh
Created May 25, 2018 06:51
git kommandoer
git config --global alias.up '!git fetch && git rebase --autostash FETCH_HEAD'
@boutros
boutros / notes.md
Created May 9, 2018 07:24 — forked from calebamiles/notes.md
Notes on Open Source Governance Models

Node.js Foundation

  • Healthy Open Source
    • explicit goal to be a lightweight process
    • concrete ability to scale to hundreds of contributors
    • good fundamental goals
      • transparency
      • participation
      • efficacy
    • ecosystem projects encouraged but not required to adopt foundation governance templates
  • creation of projects under TSC explicity delegates authority from TSC to project TC
# bash/zsh git prompt support
#
# Copyright (C) 2006,2007 Shawn O. Pearce <spearce@spearce.org>
# Distributed under the GNU General Public License, version 2.0.
#
# This script allows you to see repository status in your prompt.
#
# To enable:
#
# 1) Copy this file to somewhere (e.g. ~/.git-prompt.sh).
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
# If not running interactively, don't do anything
case $- in
*i*) ;;
*) return;;
esac
# don't put duplicate lines or lines starting with space in the history.
-- Standard awesome library
local gears = require("gears")
local awful = require("awful")
awful.rules = require("awful.rules")
require("awful.autofocus")
-- Widget and layout library
local wibox = require("wibox")
-- Theme handling library
local beautiful = require("beautiful")
-- Notification library
@boutros
boutros / jquery.js
Created February 21, 2018 09:35
jQuery in 3 lines
const $ = (selector) => document.querySelector(selector)
const $$ = (selector) => document.querySelectorAll(selector)
const on = (elem, type, listener) => elem.addEventListener(type,listener)
@boutros
boutros / response.xml
Last active November 22, 2017 08:28
koha oai harvest response curl '172.18.0.4:8080/cgi-bin/koha/oai.pl?verb=ListRecords&from=2017-11-22&metadataPrefix=marc21'
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type='text/xsl' href='/opac-tmpl/xslt/OAI.xslt'?>
<OAI-PMH xmlns="http://www.openarchives.org/OAI/2.0/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.openarchives.org/OAI/2.0/ http://www.openarchives.org/OAI/2.0/OAI-PMH.xsd">
<responseDate>2017-11-22T08:27:02Z</responseDate>
<request from="2017-11-22" metadataPrefix="marc21" verb="ListRecords">http://172.18.0.4:8080/opac/oai.pl</request>
<ListRecords>
<record>
<header status="deleted">
<identifier>DEICH-SPUTNIK:431119</identifier>
<datestamp>2017-11-22T08:00:11Z</datestamp>
@boutros
boutros / stats.txt
Created September 27, 2017 05:36
090$b
mysql> SELECT v, c
-> FROM (
-> SELECT DISTINCT ExtractValue(metadata, '//datafield[@tag="090"]/subfield[@code="b"]') AS v,
-> count(1) AS c
-> FROM biblio_metadata
->
-> GROUP BY v
-> ORDER BY c DESC
-> ) r
-> WHERE v LIKE '%q%';
@boutros
boutros / settings.json
Created September 22, 2017 06:11
es settings
{"b":{"settings":{"index":{"number_of_shards":"5","provided_name":"b","creation_date":"1504765478311","analysis":{"filter":{"language_synonym_filter":{"type":"synonym","synonyms":["bokmål => nob","nynorsk => nno","dansk, danish => dan","engelsk, english => eng","svensk, swedish => swe","afrikaans => afr","albansk, albanian => alb","amharisk, amharic => amh","arabisk, arabic => ara","armensk, armenian => arm","aserbajdsjansk, azerbaijani => aze","bambara, bambara => bam","baskisk, basque => baq","bengali => ben","bosnisk, bosnian => bos","bulgarsk, bulgarian => bul","burmansk, burmese => bur","cebuano => ceb","dari => prs","dinka => din","duala => dua","dyula => dyu","egyptisk, egyptian => egy","esperanto, esperanto => epo","estisk, estonian => est","farsi, persian => per","finsk, finnish => fin","fransk, french => fre","færøysk, faroese => fao","galisisk, galician => glg","gammelgresk, ancient greek => grc","gammelsyrisk, classical syriac => syc","georgisk, georgian => geo","gresk, greek => gre","grønlandsk,