Skip to content

Instantly share code, notes, and snippets.

View SoftCreatR's full-sized avatar
👻
Boo!

Sascha Greuel SoftCreatR

👻
Boo!
  • Gladbeck, Germany
  • 04:13 (UTC +02:00)
View GitHub Profile
@hucancode
hucancode / README.md
Last active January 18, 2024 03:57
Flatten Strapi 4's response JSON

Update 29/11/2022

There is a plugin on Strapi Marketplace that do this response transforming stuffs in a more configurable way. Checkout this if you are interested.

/**
* A bookmarklet for viewing shifted elements while debugging
* Cumulative Layout Shift (web.dev/cls). Works in Chrome 84+
* Shows the previous position of shifted elements in yellow,
* and the new position in red. Adds in a `debugger;` statement
* each timet the performance observer is notified of a layout
* shift, allowing the user to attempt to "step through" the
* shifts by pausing on each one in the devtools debugger.
* Note that the shifts have already happened at this point.
*
@mort3za
mort3za / git-auto-sign-commits.sh
Last active January 30, 2024 10:31
Auto sign your git commits
# Generate a new pgp key: (better to use gpg2 instead of gpg in all below commands)
gpg --gen-key
# maybe you need some random work in your OS to generate a key. so run this command: `find ./* /home/username -type d | xargs grep some_random_string > /dev/null`
# check current keys:
gpg --list-secret-keys --keyid-format LONG
# See your gpg public key:
gpg --armor --export YOUR_KEY_ID
# YOUR_KEY_ID is the hash in front of `sec` in previous command. (for example sec 4096R/234FAA343232333 => key id is: 234FAA343232333)