Skip to content

Instantly share code, notes, and snippets.

@fnky
fnky / ANSI.md
Last active May 5, 2025 16:20
ANSI Escape Codes

ANSI Escape Sequences

Standard escape codes are prefixed with Escape:

  • Ctrl-Key: ^[
  • Octal: \033
  • Unicode: \u001b
  • Hexadecimal: \x1B
  • Decimal: 27
@crittermike
crittermike / chmod.md
Last active October 19, 2024 14:50
How to chmod only directories

Use chmod +X (as opposed to +x) which will make only directories executable and leave files alone.

This is great for recursively fixing a Drupal files directory. For example:

chmod -R 664 sites/default/files && chmod -R a+X sites/default/files

That will make all your files writeable by you and the server, but not executable, but will also make directories executable (i.e., listable).