This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"log" | |
"github.com/pkg/errors" | |
) | |
type HTTPError struct { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"log" | |
"github.com/pkg/errors" | |
) | |
type HTTPError struct { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo zypper install u2f-server u2f-host pam_u2f ykclient |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function timein () | |
{ | |
[ "${#}" -lt 3 ] && { | |
echo 'timein <dest loc> [when] <src loc> [is] <src time>' 1>&2 | |
echo -e 'e.g.:\ntimein America/Chicago when Europe/Berlin is tomorrow 14:30' 1>&2 | |
echo -e 'or:\ntimein Asia/Ho_Chi_Minh America/New_York 2019/01/02 08:00' 1>&2 | |
return 1 | |
} | |
dest=${1}; shift |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# As detailed at http://blog.didenko.com/2010/08/locking-for-daemons-in-bash.html | |
pidf=/tmp/$(basename ${0}).pid | |
exec 221>${pidf} | |
flock --exclusive --nonblock 221 || | |
{ | |
echo "Another instance is apparently running." | |
exit 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function fusr() { | |
[ -f "${1}" ] || return 1; | |
find /proc -lname "${1}" 2>/dev/null | cut -d/ -f3 | sort -nu | xargs ps -fp; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#---------------------------------------------------- | |
# | |
# Copyright (C) 2017 Vlad Didenko | |
# | |
# This Source Code Form is subject to the terms | |
# of the Mozilla Public License, v. 2.0. If a copy | |
# of the MPL was not distributed with this file, | |
# You can obtain one at https://mozilla.org/MPL/2.0/ |
OlderNewer