Skip to content

Instantly share code, notes, and snippets.

View pabloab's full-sized avatar

Pablo pabloab

View GitHub Profile
@pabloab
pabloab / xcliptester.sh
Last active January 24, 2018 04:55
[xclip bug 37 tester] Little tool created to test xclip issue #37 #xclip
#!/bin/bash
# Before used xmacrorec2 > test.macro, capturing from 0,0 to different points on screen.
# $ cat test-1000-1000.macro
# KeyStrPress Control_L
# KeyStrPress Shift_L
# KeyStrPress Print
# KeyStrRelease Print
# KeyStrRelease Shift_L
# KeyStrRelease Control_L
@pabloab
pabloab / koha-auth_txt2mrc.pl
Last active January 24, 2018 04:56
[Tamil to MRC format] Convert Koha::Contrib::Tamil koha-auth TXT to MRC format #Koha
#!/usr/bin/perl
use Modern::Perl;
use MARC::Record;
@ARGV == 2 or die "usage: $0 auths.txt auths.mrc\n";
my $inf = shift();
my $ouf = shift();
@pabloab
pabloab / testInternet.sh
Last active January 24, 2018 05:03
[Online tester] Test if online. A nice guitar pluck sound loud when comes back
#!/bin/bash
set -euo pipefail # unofficial bash strict mode: http://redsymbol.net/articles/unofficial-bash-strict-mode/
IFS=$'\n\t'
# By Pablo Bianchi (pablo.bianchi@gmail.com)
# Infinit loop testing if we are onliene. When we are start beeping.
# (based on http://www.linuxscrew.com/2009/04/02/tiny-bash-scripts-check-internet-connection-availability/ )
#~ USAGE: Just: ./testInternet.sh
#~ NOTES
@pabloab
pabloab / CLI-Cheatsheets.md
Last active January 26, 2018 16:51
[CLI Cheatsheet] Mysc command line related cheatsheets #CLI #cheatsheet

Cheatsheets

Bash keyboard shortcuts

  • Ctrl+P Up / Previous (!!)
  • Ctrl+N Down / Next

  • Ctrl+B Left / Back
  • Ctrl+F Right / Forward

  • Ctrl+A Home. Sometimes used by tmux/byobu.
  • Ctrl+E End
@pabloab
pabloab / byobuCommands.md
Last active March 14, 2019 02:09
Some useful tmux / Byobu shortcuts

Cheatsheet: byobu and tmux commands

Of course Ctrl+s should be replaced with your preffix shortcut.

Window-related

Shortcut Description
@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 / 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
  • 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 / 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