Skip to content

Instantly share code, notes, and snippets.

@TravisCarden
TravisCarden / README.md
Last active January 8, 2024 03:16
iTerm2 status bar component for the latest Git commit message

iTerm2 status bar component for the latest Git commit message

screenshot

Generate the component text

# bash: Place this in .bashrc.
# zsh: Place this in .zshrc.
test -e "${HOME}/.iterm2_shell_integration.zsh" && source "${HOME}/.iterm2_shell_integration.zsh"
@TravisCarden
TravisCarden / .finnicky.js
Last active July 8, 2024 14:45
Open ClickUp links from anywhere in the desktop app
module.exports = {
rewrite: [
{
// Change the protocol to the one the desktop app recognizes.
match: finicky.matchHostnames(["app.clickup.com"]),
url: { protocol: "clickup" }
}
],
[
// Then route it to the ClickUp app.
@TravisCarden
TravisCarden / phpcs-sniffs.md
Last active August 16, 2023 18:50
List of all built-in sniffs in PHP_CodeSniffer (PHPCS) v3.6.2

Built-in sniffs in PHP_CodeSniffer (PHPCS) v3.6.2

Following are all the sniffs included in a default Composer installation of PHP_CodeSniffer (PHPCS).

Wed May 25 15:30:44 EDT 2022
PHP_CodeSniffer version 3.6.2 (stable) by Squiz (http://www.squiz.net)
The installed coding standards are PEAR, Zend, PSR2, MySource, Squiz, PSR1 and PSR12
@TravisCarden
TravisCarden / php-exceptions.md
Last active April 10, 2023 12:35
List of all PHP exceptions

All PHP exceptions up to PHP 8.1

All, with Hierarchy

  • Exception (PHP 5, PHP 7, PHP 8) is the base class for all user exceptions.
    • ErrorException (PHP 5 >= 5.1.0, PHP 7, PHP 8) is an Error Exception.
    • LogicException (PHP 5 >= 5.1.0, PHP 7, PHP 8) represents an error in the program logic. This kind of exception should lead directly to a fix in your code.
      • BadFunctionCallException (PHP 5 >= 5.1.0, PHP 7, PHP 8) is thrown if a callback refers to an undefined function or if some arguments are missing.
  • BadMethodCallException (PHP 5 >= 5.1.0, PHP 7, PHP 8) is thrown if a callback refers to an undefined method or if som