Skip to content

Instantly share code, notes, and snippets.

View honzahommer's full-sized avatar
🎯
Focusing

Honza Hommer honzahommer

🎯
Focusing
View GitHub Profile

Keybase proof

I hereby claim:

  • I am honzahommer on github.
  • I am honzahommer (https://keybase.io/honzahommer) on keybase.
  • I have a public key whose fingerprint is 78A9 F88A 5277 04EA C814 169A C345 C534 806C 79E2

To claim this, I am signing this object:

Ubuntu GNOME (and Debian) tweak scripts colletion...
#!/usr/bin/env bash
{ # this ensures the entire script is downloaded #
if [ $EUID != 0 ]; then
echo "ERROR: You have to be root to execute this script"
exit 1
fi
DEBIAN_FRONTEND=noninteractive
#!/usr/bin/env bash
{ # this ensures the entire script is downloaded #
if [ $EUID != 0 ]; then
echo "ERROR: You have to be root to execute this script"
exit 1
fi
DEBIAN_FRONTEND=noninteractive
@honzahommer
honzahommer / cf-alert-hide.js
Last active February 20, 2017 09:47
Hide Cloudflare's Always Online™ alert and reload page after 60 seconds
/**
* @function
* @name Anonymous self-invoked function
* @description Hide Cloudflare's Always Online™ alert and reload page after 60 seconds
* @author Honza Hommer <honza@hommer.cz>
*/
(function () {
var alert
if (alert = document.getElementById('cf_alert_div'), alert !== null && alert.innerText.indexOf('offline') === -1)
@honzahommer
honzahommer / .bash_aliases
Last active March 11, 2017 07:19
Compute Metadata Attachments
# ~/.bash_aliases: Bash alias, function and prompt definitions.
case $- in
*i*) ;;
*) return;;
esac
export HISTFILESIZE=1000
export HISTCONTROL=ignoredups
export LSCOLORS=ExGxxxxxCxxxxxCxCxExEx
@honzahommer
honzahommer / nvm.md
Last active September 20, 2017 05:59
FreeBSD scripts

Install nvm and create hotfix for nvm install command on FreeBSD.

Install packages, require root (wheel) privileges.

echo "y" | pkg install bash git gmake wget

There is an issue with autodetection C++ and C compiler, export paths manunally.

cat &lt;&gt; $HOME/.profile
@honzahommer
honzahommer / isipv4.sh
Last active January 28, 2019 21:33
isipv4.sh
#!/usr/bin/env bash
isipv4() {
if [[ $# -eq 0 ]] ; then
return 1
fi
if [[ $# -gt 1 ]] ; then
local this="${FUNCNAME[0]}"
@honzahommer
honzahommer / ismac.sh
Last active January 28, 2019 21:36
ismac.sh
#!/usr/bin/env bash
_ver=$(echo $BASH_VERSION | awk -F. '{ printf "%i%i", $1, $2 }')
ismac() {
if [[ $# -eq 0 ]] ; then
return 1
fi
if [[ $# -gt 1 ]] ; then
@honzahommer
honzahommer / isversion.sh
Last active January 28, 2019 21:27
isversion.sh
#!/usr/bin/env bash
isversion() {
if [[ $# -lt 2 ]] ; then
local opd='`=`'
local ops='`<` or `>` or `=`'
echo "usage: $0 <versions> <versions> [operator=$opd]"
echo -e "\tversions - Versions to compare"
echo -e "\toperator - Operator to compare, $ops. Default to $opd."