Skip to content
Code Snippets
Useful code to copy and paste
  • ALL
  • Acquia
  • Acquia API
  • Acquia Cloud IDE
  • Acquia Cloud Site Factory
  • Bash
  • Bootstrap
  • C#
  • CSS
  • curl
  • Drupal 8-9
  • Drupal Modules
  • Drush
  • HTML
  • JavaScript
  • jQuery
  • Lando
  • MacOS
  • PHP
  • Raspbian
  • Terminal
  • Unity
  • Website Templates
  • WordPress

Category: Terminal

Linux command that prints directories and sub-directories as a tree structure

January 27, 2023 Leonardo Signorelli

To show a graphical representation of the current sub-directories without files use the following linux command: Example: To display both…

Continue Reading →

Posted in: Terminal Filed under: terminal

Copy an ISO to a USB Drive from a Mac using dd

December 10, 2022 Leonardo Signorelli

Attach the target USB drive to your Mac if you haven’t done so yet, then launch the Terminal. Type the…

Continue Reading →

Posted in: MacOS, Terminal Filed under: bootable USB, Format USB, MacOS, MacOS X, terminal

How to check if a site is on Akamai using Linux

December 1, 2022 Leonardo Signorelli

Run the following “dig” command against the URL in question: dig <URL> +noall +answer Example:

Continue Reading →

Posted in: Terminal Filed under: linux, terminal

How To enable HSTS for your site

September 22, 2022 Leonardo Signorelli

Configure your .htaccess File You should edit your .htaccess file to add the proper headers to static assets. Here is…

Continue Reading →

Posted in: curl, Terminal Filed under: curl, HSTS, terminal

Find files larger than 5mb in Linux

September 12, 2022 Leonardo Signorelli

To find files larger than 5 MB, we need to pass the -size option with value +5M in the find…

Continue Reading →

Posted in: Terminal Filed under: awk, awk command, find command, terminal

Git Best Practices on Acquia Cloud Platform

September 8, 2022 Leonardo Signorelli

Find your Git URL On your Acquia Cloud Platform Application page, go to any of the environments admin pages (dev,…

Continue Reading →

Posted in: Acquia, Terminal Filed under: Acquia, Acquia Cloud, git, git commands, terminal

Fix: TrackPad Scroll Not Working in nano on MacOS

September 1, 2022 Leonardo Signorelli

If you are not able to scroll up and down using your mouse or TrackPad when editing a file using…

Continue Reading →

Posted in: MacOS, Terminal Filed under: MacOS, terminal

Check if a page is caching with curl

August 17, 2022 Leonardo Signorelli

Open the terminal and type the following curl command with the desired site/page: curl -Ik https://www.uccs.edu We can see that…

Continue Reading →

Posted in: curl, Terminal Filed under: curl, terminal

Linux: Convert a text file with URLs to a HTML file with clickable links

July 25, 2021 Leonardo Signorelli

We have a file called URLs.txt with URLs: http://www.google.com http://www.reddit.com We want to create an HTML file with clickable URLs:…

Continue Reading →

Posted in: Bash, Terminal, Uncategorized Filed under: Bash, linux, perl, terminal, wget

Scrape a site with wget using a sitemap.xml

Leonardo Signorelli

The following wget command will create a file called urls.txt containing all the URLs found in a site’s sitemap.xml file.…

Continue Reading →

Posted in: Bash, Terminal, Uncategorized Filed under: Bash, linux, terminal, wget

Post navigation

Page 1 of 2
1 2 Next →
  • ALL
  • Acquia
  • Acquia API
  • Acquia Cloud IDE
  • Acquia Cloud Site Factory
  • Bash
  • Bootstrap
  • C#
  • CSS
  • curl
  • Drupal 8-9
  • Drupal Modules
  • Drush
  • HTML
  • JavaScript
  • jQuery
  • Lando
  • MacOS
  • PHP
  • Raspbian
  • Terminal
  • Unity
  • Website Templates
  • WordPress
Copyright © 2023 Code Snippets — Escapade WordPress theme by GoDaddy