Value | Color |
---|---|
\e[0;30m | Black |
\e[0;31m | Red |
\e[0;32m | Green |
\e[0;33m | Yellow |
\e[0;34m | Blue |
\e[0;35m | Purple |
This file contains hidden or 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 | |
# 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 |
This file contains hidden or 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/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) |
This file contains hidden or 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
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'
This file contains hidden or 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
# 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 |
NewerOlder