Skip to content

Instantly share code, notes, and snippets.

View pabloab's full-sized avatar

Pablo pabloab

View GitHub Profile
@pabloab
pabloab / StartPage Bangs
Created August 29, 2022 22:10 — forked from michaelmob/StartPage Bangs
Adds !s to StartPage, like DDG
// ==UserScript==
// @name StartPage Bangs
// @namespace http://tarkus.co/
// @version 0.1
// @description Adds !s to StartPage, like DDG
// @match https://startpage.com/*
// @run-at document-start
// ==/UserScript==
// Bangs
@pabloab
pabloab / silent-mouse.sh
Last active May 25, 2021 19:47 — forked from guiambros/silent-mouse.sh
silent-mouse.sh
#!/bin/bash
# Check which version you're using
echo
echo "---------------------------------------------------------------------------"
cd ~ || exit
upower --version
UPOWER_ORIG_VER=$(upower --version)
# Check Debian / Ubuntu vs. Arch Linux / Manjaro
  • Back in history: Without changing the default setup Alt + Y and Alt + U go to previous and next directory in history, which may be enough on most cases. If not, [you always have Home, Enter][1].
  • Sort: Sort: alt + ! SortReverse: alt + @ SortByName: alt + # SortByExt: alt + $ SortBySize: alt + % SortByMTime: alt + ^

@pabloab
pabloab / oai-pmh-conffile.yaml
Created July 30, 2019 16:58
Example of OAI-PMH ConfFile for Koha
format:
marcxml:
metadataPrefix: marxml
metadataNamespace: http://www.loc.gov/MARC21/slim http://www.loc.gov/standards/marcxml/schema/MARC21slim
schema: http://www.loc.gov/MARC21/slim http://www.loc.gov/standards/marcxml/schema/MARC21slim.xsd
include_items: 1
oai_dc:
metadataPrefix: oai_dc
metadataNamespace: http://www.openarchives.org/OAI/2.0/oai_dc/
schema: http://www.openarchives.org/OAI/2.0/oai_dc.xsd
@pabloab
pabloab / Cómo hacer buenas reuniones de trabajo.md
Last active April 26, 2021 19:36
¿Cómo hacer buenas reuniones de trabajo?

Cómo hacer buenas reuniones de trabajo

  • Tener claro Qué a tratar y por cuánto tiempo:
    • ¿Motivo?
    • ¿Tiempo a ocupar?
  • Y si es una reunión:
    • para decidir
    • para informar
    • para discutir
@pabloab
pabloab / line-mode-MARC.sublime-syntax
Last active July 20, 2023 02:18
Sublime syntax for MARC line mode files (yaz-marcdump), used by syntect and therefore by bat
%YAML 1.2
---
# By Pablo Bianchi
name: MARC line mode (yaz-marcdump)
file_extensions:
- line
scope: string
uuid: 222f19a4-f491-4e71-a391-00b138add2a0
contexts:
@pabloab
pabloab / CLI-not-so-known_handy_utils.md
Last active September 8, 2020 23:05
List of not-so-known handy CLI utils

List of not-so-known handy CLI utils

Inspired from this Twitter post.

  • tig # text-mode interface for Git
  • diff-so-fancy # 11.5k
  • ncdu # Disk usage analyzer
  • bat # cat alternative
  • fzf # 20.4k A command-line fuzzy finder. Probably there is a oh-my-zsh plugin
  • httpie # 40.3k CLI, cURL-like tool for humans. See https://httpie.org/
@pabloab
pabloab / pomodoro
Last active February 2, 2023 18:55
Simple pomodoro bash script that switch between sound outputs
#!/usr/bin/env bash
# Little script to play a music/sound on pomodoros through headphones and call to come back to work through HDMI speakers.
# set -euo pipefail # Unofficial bash strict mode
# Prerequsitres: gtts (`pip install --user --upgrade gtts`, mpv (`flatpak install io.mpv.Mpv`), vlc, libsox-fmt-mp3 and retry.
# Also use yt-dlp instead of yt-dl https://hund.tty1.se/2021/10/12/how-to-use-yt-dlp-instead-of-yt-dl-with-mpv.html
# TODO/Known bugs:
# - Fix issue with PipeWire: pacmd stat No PulseAudio daemon running, or not running as session daemon. https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/357
@pabloab
pabloab / koha-export-patron-images.sh
Created September 30, 2018 02:06
Bash script to export patron images from a Koha instance and generate DATALINK.TXT to import into another instance.
#!/bin/bash
# set -euo pipefail # unofficial bash strict mode
# IFS=$'\n\t'
echo "This script bulk export patron images from a Koha instance and generate DATALINK.TXT to import into another instance."
# @TODO
# -
# [PARAMS]
@pabloab
pabloab / landscape-sysinfo-alternative.sh
Last active October 21, 2023 18:36
[landscape-sysinfo alternative ], more cross-linux
#!/bin/bash
# Simple motd script for any systemd Linux (tested on Debian)
# Inspiration: https://superuser.com/questions/919962/landscape-sysinfo-for-centos
# Inspiration 2: https://github.com/thusoy/headsup/blob/master/headsup.py
os-name=$()
os-kernel=$()
date-today=$()
system-load=$()
processes=$(cat /proc/loadavg | cut -d"/" -f2| cut -d" " -f1)