Skip to content

Instantly share code, notes, and snippets.

View CouldBeThis's full-sized avatar

CouldBeThis CouldBeThis

  • lol nope
View GitHub Profile
@CouldBeThis
CouldBeThis / shellcolors.sh
Created March 8, 2022 12:02 — forked from connorjan/shellcolors.sh
Definitions for the shell colors (and other attributes) through tput
# Text color - normal
fgblack="$(tput setaf 0)" # Black
fgred="$(tput setaf 1)" # Red
fggreen="$(tput setaf 2)" # Green
fgyellow="$(tput setaf 3)" # Yellow
fgblue="$(tput setaf 4)" # Blue
fgpurple="$(tput setaf 5)" # Purple
fgcyan="$(tput setaf 6)" # Cyan
fgwhite="$(tput setaf 7)" # White

lsd: config.yaml

a bunch of options for lsd config

# == Date ==
# This specifies the date format for the date column. The freeform format
# accepts an strftime like string.
# When "classic" is set, this is set to "date".
# Possible values: date, relative, '+<date_format>'
@CouldBeThis
CouldBeThis / create-file-with-yyy-mm-dd-date-in-filename.md
Created December 7, 2021 01:41
how to create a file with YYY-MM-DD set in the filename
touch "$(date +%F) filename.txt"

creates file named 2021-12-06 filename.txt

touch "$(date) filename.txt"
@CouldBeThis
CouldBeThis / create-multiple-riectories-at-once.md
Created November 26, 2021 04:44
create multiple directories at once

make multiple directories

mkdir -p {dir,dir2}

tree
.
├── dir
└── dir2
@CouldBeThis
CouldBeThis / grab-commons-images-sh
Created November 4, 2021 20:55 — forked from loleg/grab-commons-images-sh
Download images and metadata from a Wikimedia Commons category or results page
#!/bin/bash
#
# Download images from a Wikimedia Commons category
#
# Highest preview resolution and metadata in XML format will be saved in subfolders.
# Usage: execute this script on a Linux command line, providing the full URL to the category page.
#
# Shell tools required for this script: wget sed grep
#
@CouldBeThis
CouldBeThis / linux-misc.md
Created October 31, 2021 10:12
linux shell terminal misc.md

linux shell terminal misc

be able to use the terminal after opening an application which is still open

put & after the command.

kate file.txt &
@CouldBeThis
CouldBeThis / linux-trackpad-troublshooting.md
Last active October 31, 2021 09:49
trackpad troubleshooting (stuck mouse on laptop touchpad)

trackpad troubleshooting (stuck mouse on laptop touchpad)

how to ficx when trackpad stop working all of a sudden but USB mouse and rest of system OK.

source with explanations and various other solutions

find out device's info:

$ grep -iA2 touchpad /proc/bus/input/devices
@CouldBeThis
CouldBeThis / linux-file-search.md
Last active October 31, 2021 08:55
🐌 file search

🐌 file search

interactive regex of file(s) contents

could use fzf to similar effect; I do not have it installed.

open interactive regex file contents search in current directory:

rg . | sk --regex