Skip to content

Instantly share code, notes, and snippets.

View chindraba-work's full-sized avatar
🏠
"Working" from home (and having fun with it)

Chindraba chindraba-work

🏠
"Working" from home (and having fun with it)
View GitHub Profile
#!/usr/bin/env bash
# SPDX-License-Identifier: MIT
# Copyright 2023 Chindraba (Ronald Lamoreaux) <projects@chindraba.work>
for n in {1..100}
do
a=''
((0==n%3)) && a='Fizz'
((0==n%5)) && a="${a}Buzz"
echo "${a:-$n}"
@chindraba-work
chindraba-work / vd-tops.sh
Created January 6, 2021 15:35
Single command to screenshot all KDE virtual desktops into one large image.
#!/usr/bin/env bash
# SPDX-License-Identifier: CC-BY-SA-3.0
# Script to take a screenshot of all the desktops and stitch them together into
# single image.
# Only slightly modified from an answer on AskUbuntu
# https://askubuntu.com/a/951399/1167939
# by user derHugo
# https://askubuntu.com/users/423684/derhugo
@chindraba-work
chindraba-work / color-creeper.css
Last active September 11, 2020 09:05
Change the background color of an element by washing a gradient across it.
@keyframes color-creep-in {
0% {background-image: linear-gradient(var(--cc-deg),var(--cc-old), 0%, var(--cc-old));}
1% {background-image: linear-gradient(var(--cc-deg),var(--cc-new), 1%, var(--cc-old));}
2% {background-image: linear-gradient(var(--cc-deg),var(--cc-new), 2%, var(--cc-old));}
3% {background-image: linear-gradient(var(--cc-deg),var(--cc-new), 3%, var(--cc-old));}
4% {background-image: linear-gradient(var(--cc-deg),var(--cc-new), 4%, var(--cc-old));}
5% {background-image: linear-gradient(var(--cc-deg),var(--cc-new), 5%, var(--cc-old));}
6% {background-image: linear-gradient(var(--cc-deg),var(--cc-new), 6%, var(--cc-old));}
7% {background-image: linear-gradient(var(--cc-deg),var(--cc-new), 7%, var(--cc-old));}
8% {background-image: linear-gradient(var(--cc-deg),var(--cc-new), 8%, var(--cc-old));}
@chindraba-work
chindraba-work / color-swiper.css
Last active September 11, 2020 09:02
Change the background color of an element by swiping a band across it.
@keyframes color-swipe-in {
0% {background-image: linear-gradient(var(--cs-deg),var(--cs-old), var(--cs-old) 0%, var(--cs-old) 0%, var(--cs-old));}
1% {background-image: linear-gradient(var(--cs-deg),var(--cs-new), var(--cs-new) 1%, var(--cs-old) 1%, var(--cs-old));}
2% {background-image: linear-gradient(var(--cs-deg),var(--cs-new), var(--cs-new) 2%, var(--cs-old) 2%, var(--cs-old));}
3% {background-image: linear-gradient(var(--cs-deg),var(--cs-new), var(--cs-new) 3%, var(--cs-old) 3%, var(--cs-old));}
4% {background-image: linear-gradient(var(--cs-deg),var(--cs-new), var(--cs-new) 4%, var(--cs-old) 4%, var(--cs-old));}
5% {background-image: linear-gradient(var(--cs-deg),var(--cs-new), var(--cs-new) 5%, var(--cs-old) 5%, var(--cs-old));}
6% {background-image: linear-gradient(var(--cs-deg),var(--cs-new), var(--cs-new) 6%, var(--cs-old) 6%, var(--cs-old));}
7% {background-image: linear-gradient(var(--cs-deg),var(--cs-new), var(--cs-new) 7%, var(--cs-old) 7%, var(-
@chindraba-work
chindraba-work / hello_class
Created April 23, 2020 22:40
Hello class ascii art download
_______ _ _ _______
|\ /|( ____ \( \ ( \ ( ___ )
| ) ( || ( \/| ( | ( | ( ) |
| (___) || (__ | | | | | | | |
| ___ || __) | | | | | | | |
| ( ) || ( | | | | | | | |
| ) ( || (____/\| (____/\| (____/\| (___) |
|/ \|(_______/(_______/(_______/(_______)
_______ _ _______ _______ _______
@chindraba-work
chindraba-work / keybase.md
Last active March 2, 2019 22:54
Keybase proof of identity

Keybase proof

I hereby claim:

  • I am chindraba-work on github.
  • I am chindraba (https://keybase.io/chindraba) on keybase.
  • I have a public key ASCy2bvDniygZfeNh3O7pUYwQr98YE_w7rpKmjsvwen4SQo

To claim this, I am signing this object:

@chindraba-work
chindraba-work / slash_comment_stripper_single.txt
Created July 30, 2018 07:24
Regular expression to remove comments marked with a double slash - one-line version
^((?:(?:(?:[^"'/\n]|/(?!/))*)(?("(?=(?:\\\\|\\"|[^"])*"))(?:"(?:\\\\|\\"|[^"])*")|(?('(?=(?:\\\\|\\'|[^'])*'))(?:'(?:\\\\|\\'|[^'])*')|(?(/)|.))))*)
function show_help()
{
echo "dump all git versions of a file to separate files"
echo
echo "usage: FILENAME";
echo
echo "e.g."
echo
echo "$ git_dump_all_versions_of_a_file.sh path/to/somefile.txt"
echo