Skip to content

Instantly share code, notes, and snippets.

@paulirish
paulirish / how-to-view-source-of-chrome-extension.md
Last active January 1, 2025 22:49
How to view-source of a Chrome extension

Option 1: Command-line download extension as zip and extract

extension_id=jifpbeccnghkjeaalbbjmodiffmgedin   # change this ID
curl -L -o "$extension_id.zip" "https://clients2.google.com/service/update2/crx?response=redirect&os=mac&arch=x86-64&nacl_arch=x86-64&prod=chromecrx&prodchannel=stable&prodversion=44.0.2403.130&x=id%3D$extension_id%26uc" 
unzip -d "$extension_id-source" "$extension_id.zip"

Thx to crxviewer for the magic download URL.

@JackZielke
JackZielke / eshell.sh
Created February 20, 2022 02:49
Create a BusyBox based Emergency Shell
#!/bin/bash
###########################################################################
### Creates a BusyBox emergency shell in RAM
###
### Script by Jack Zielke <[email protected]>
### http://linuxcoffee.com/eshell
###
### BusyBox is maintained by Denys Vlasenko, and licensed under the GNU
### GENERAL PUBLIC LICENSE version 2.
@ChristopherA
ChristopherA / git-environment-variables.md
Last active January 1, 2025 22:45
Git Environment Variable for Shell Scripts

Git Environment Variable for Shell Scripts

GIT_AUTHOR_IDENT & GIT_COMMITTER_IDENT

The GIT_COMMITTER_IDENT and GIT_AUTHOR_IDENT environment variables allow you to set detailed author and committer information for a git commit in a single environment variable. These variables give you finer control over the identity information attached to commits, which can be particularly useful in automated systems or scripts that manage multiple git operations, or when you need to override both the name, email, and date simultaneously without setting each component individually.

It's worth noting that these variables are less commonly used and are not as well-documented as the individual GIT_AUTHOR_NAME, GIT_AUTHOR_EMAIL, GIT_COMMITTER_NAME, and GIT_COMMITTER_EMAIL variables.

Format

@ChristopherA
ChristopherA / zsh_opinionated_best_practices.md
Last active January 1, 2025 22:44
Zsh - Opinionated Best Practices

Zsh Opinionated - A Guide to Best Practices

  • Abstract: This guide provides best practices for writing clear, maintainable, and robust Zsh scripts. Aimed at helping developers transition from Bash to Zsh, particularly on macOS, this guide offers practical advice and examples for creating standardized and efficient scripts.

  • Copyright This text of this guide is Copyright ©️2024 by Christopher Allen, and is shared under spdx:CC-BY-SA-4.0 open-source license. All the example code is relenquished to the public domain under spx:CC0-1.0.

  • Tags: #zsh #scripting #cli #opinionated

@cliffordp
cliffordp / bypass-cloudflare-email-protection.js
Created February 16, 2024 16:31 — forked from neopunisher/bypass-cloudflare-email-protection.js
How to circumvent Cloudflare's [email protected] thing, WITHOUT enabling Javascript
// Adapted from https://raddle.me/f/Privacy/3722/how-to-circumvent-cloudflare-s-email-protected-thing-without with the help of chatGPT
function fixObfuscatedEmails() {
const elements = document.getElementsByClassName('__cf_email__');
for (let i = 0; i < elements.length; i++) {
const element = elements[i];
const obfuscatedEmail = element.getAttribute('data-cfemail');
if (obfuscatedEmail) {
const decodedEmail = decrypt(obfuscatedEmail);
element.setAttribute('href', 'mailto:' + decodedEmail);
element.innerHTML = decodedEmail;

Upgrade CentOS 7 to AlmaLinux 8

In 2020, Red Hat announced that CentOS 8 will no longer receive support after the end of 2021 and will be succeeded by CentOS Stream, see also our article 'What is CentOS Stream'. CentOS 7 will be supported longer until June 30, 2024.

You may want to upgrade to an alternative to CentOS before then, but reinstalling your VPS is not a desirable option. In this guide, we show you how to upgrade your VPS from CentOS 7 to AlmaLinux 8 (or OracleLinux or Rocky Linux).

The steps in this guide have been successfully tested on up-to-date installations of CentOS 7 and DirectAdmin 1.63.0 with CentOS 7.

Take a snapshot before you start the upgrade process so that you can fall back on it if you experience problems after upgrading to AlmaLinux.

@seanh
seanh / vimgrep.md
Last active January 1, 2025 22:36
vimgrep cheatsheet

vimgrep

  • Vimcasts on vimgrep

  • Uses native vim regexes (which are slightly different from the regexes used by grep, ack, ag, etc) so the patterns are the same as with vim's within-file search patterns.

You can do a normal within-file search first, then re-use the same pattern to

@wikiti
wikiti / !FAB-CLAIM-README.md
Last active January 1, 2025 22:35
A script to automatically add all Quixel MegaScans items to your FAB account

Important

This script was built for educational purposes. Due to how FAB APIs are built to handle search pagination, all assets might not be claimable through this script. With the last script update, a total of ~600 scanned pages, with ~14k assets. Please note that, by clicking on the "Claim All" quixel button, you'll already have claimed all assets for future free usage, beyond 2024 (official response). This script simply makes sure that assets are added to a library.

Script to add all quixel megascan items to your FAB account

As quixel megascan items will stop being free after 2024. So, this script will go through all Quixel MegaScan items and add them to your account. Quixel would be working on a tool to automatically add all resources to your FAB account, but I couldn't help myself and I wrote a script to do it.

How to use