Skip to content

Instantly share code, notes, and snippets.

View axelinternet's full-sized avatar

Axel Hultman axelinternet

View GitHub Profile
tree displays the directory structure of the current directory. -d option displays only directories. -I option allows to exclude directories that match specific pattern e.g.
tree -I node_modules
In order to exclude multiple directories at once, their names must be separated by | sign, i.e.
tree -I 'node_modules|cache|test_*'
This command will skip node_modules, cache directories (along with their content) from the output, and all directories that match test_* wildcard expression.
@axelinternet
axelinternet / common_browser_extension_errors.md
Created September 24, 2019 07:37
Common browser extension errors

Errors

  1. l.LegacyGlobal.should_do_lastpass_here is not a function
source env/bin/activate
python3 -m virtualenv env/
source env/bin/activate
pip install -r requirements.txt

Add a new remote called all that we'll reference later when pushing to multiple repositories:

  $ git remote add all git://original/repo.git
  $ git remote -v
  all git://original/repo.git (fetch)               <-- ADDED
  all git://original/repo.git (push)                <-- ADDED
  origin  git://original/repo.git (fetch)
  origin  git://original/repo.git (push)
  $ git config -l | grep '^remote\.all'
  remote.all.url=git://original/repo.git            <-- ADDED
@axelinternet
axelinternet / shuffleArray.js
Created November 6, 2018 13:40
Durstenfeld shuffle
const shuffleArray = array => {
for (let i = array.length - 1; i > 0; i--) {
const j = Math.floor(Math.random() * (i + 1));
[array[i], array[j]] = [array[j], array[i]]; // eslint-disable-line no-param-reassign
}
return array
}