I use a GPG key to sign my git commits.
An error like this one might be a sign of an expired GPG key.
error: gpg failed to sign the data fatal: failed to write commit object
#!/bin/bash | |
# Check if curl is installed | |
if ! [ -x "$(command -v curl)" ]; then | |
echo "Error: curl is not installed. Please install curl and try again." >&2 | |
exit 1 | |
fi | |
# Check if jq is installed | |
if ! [ -x "$(command -v jq)" ]; then |
#!/bin/sh | |
# usage: | |
# ql /tmp/file.jpg | |
# cat /tmp/file.jpg | ql | |
# cal -h | ql | |
if [ -z "$*" ]; then | |
cat > /tmp/ql.stdin | |
mime_type=$(file --brief --mime-type /tmp/ql.stdin) |
git_protocol: ssh | |
aliases: | |
personal: '!cp ~/.config/gh/hosts.yml.personal ~/.config/gh/hosts.yml && gh auth status' | |
work: '!cp ~/.config/gh/hosts.yml.work ~/.config/gh/hosts.yml && gh auth status' |
[](https://www.youtube.com/watch?v={video-id})
Embed youtube to markdown, GitLab, GitHub
How to embed youtube video to markdown file, GitHub or GitLab comments · Sergei Sviridov's Blog
example <title>this is it</title>
if we want to extract just this is it
.
echo '<title>this is it</title>' | sed -nE 's/<title>(.*)<\/title>/\1/p'
# National Anthem of USSR | |
# Execute this ShellScript, Soviet Anthem Plays You. | |
# Before execute this, you have to install Sox(Sound eXchange) by apt-get / brew. | |
mkdir notes | |
cat << EOS | grep -v "-" | awk '{if ($1=="z") {print "sox -n -c 2 notes/"NR".wav trim 0.0", $2/4} else {{print "sox -n -c 2 notes/" NR ".wav synth", $2/4, "pluck", $1, "\\"} if ($3!="") {print "pluck", $3, "\\"} if ($5!="") {print "pluck", $5, "\\"} print ";"}}END{print "sox notes/{1.."NR-1"}.wav song_new.wav"}' | bash | |
E4 4 G4 4 C5 4 | |
- | |
D4 1 G4 1 D5 1 | |
C4 1 G4 1 C5 1 |