Skip to content

Instantly share code, notes, and snippets.

View pabloab's full-sized avatar

Pablo pabloab

View GitHub Profile
@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 / 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();