Skip to content

Instantly share code, notes, and snippets.

View selimhex's full-sized avatar
🥴

Szm selimhex

🥴
View GitHub Profile

Screen Quick Reference

Basic

Description Command
Start a new session with session name screen -S <session_name>
List running sessions / screens screen -ls
Attach to a running session screen -x
Attach to a running session with name screen -r
@selimhex
selimhex / sx-lwc-utils.js
Last active March 22, 2024 15:32
debugging helper for weird js frameworks (#lwc😭)
prettyJson = (obj) => {
return JSON.stringify(obj, null, 2);
};
log(obj, name = "", color = null, table = false) {
if (table) {
console.log(`%c${name}`, `color: ${color || "unset"}`);
console.table(obj);
return;
}
console.log(`%c${name}`, `color: ${color || "unset"}`, this.prettyJson(obj));
@selimhex
selimhex / encode_decode_all_webp.sh
Last active March 16, 2022 13:23
encode / decode directory of webp files
# https://developers.google.com/speed/webp/faq#how_can_i_convert_my_personal_images_files_to_webp
# convert all jpeg files in a directory
for F in *.jpg; do cwebp $F -o `basename ${F%.jpg}`.webp; done
# decode all webp files in a directory to png
for F in *.webp; do dwebp $F -o `basename ${F%.webp}`.png; done
@selimhex
selimhex / create_directories_from_array.sh
Last active March 22, 2024 15:31
create directories from array
mkdir -p {Devrim,Dominique,Frank,Görkem,Henrik,Jens,Jürgen,Kevin,Rosanna,Selim}
echo "done"
@selimhex
selimhex / .bash_profile
Last active May 31, 2020 12:24
bash alias function to start a local php server anywhere
# a primitive alias function to start a local php server
# add this function to ~/.bash_profile and restart terminal
# $ stphpserverhere or $ stp[tab]
# no arguments starts the server at the current directory (pwd)
# stphpserverhere 0 > starts the server at the default root
# stphpserverhere ~/Documents/anotherDir starts the server at anotherDir.
stphpserverhere() {
serverroot=$(pwd)
echo $serverroot
@selimhex
selimhex / folders_to_link.txt
Created April 5, 2020 15:27
read folder names from a txt file and create soft links to them from the current directory in bash
@selimhex
selimhex / keybase.md
Created February 19, 2020 16:18
keybase github proof.

Keybase proof

I hereby claim:

  • I am selimhex on github.
  • I am selimhex (https://keybase.io/selimhex) on keybase.
  • I have a public key ASAOFXE0LJB8XPLqrrEwd7dMHWu_JoYhdBE1v7w3bCP83wo

To claim this, I am signing this object: