nvm is not compatible with the npm config “prefix” option:

Delete and Reset the prefix $ npm config delete prefix $ npm config set prefix $NVM_DIR/versions/node/v6.11.1 Note: Change the version number with the one indicated in the error message. nvm is not compatible with the npm config “prefix” option: currently set to “/usr/local” Run “npm config delete prefix” or “nvm use –delete-prefix v6.11.1 –silent” to … Read more

Remove namespace prefix while JAXB marshalling

After much research and tinkering I have finally managed to achieve a solution to this problem. Please accept my apologies for not posting links to the original references – there are many and I wasn’t taking notes – but this one was certainly useful. My solution uses a filtering XMLStreamWriter which applies an empty namespace … Read more

How to rename with prefix/suffix?

You could use the rename(1) command: rename ‘s/(.*)$/new.$1/’ original.filename Edit: If rename isn’t available and you have to rename more than one file, shell scripting can really be short and simple for this. For example, to rename all *.jpg to prefix_*.jpg in the current directory: for filename in *.jpg; do mv “$filename” “prefix_${filename}”; done; or … Read more

Python regex – r prefix

Because \ begin escape sequences only when they are valid escape sequences. >>> ‘\n’ ‘\n’ >>> r’\n’ ‘\\n’ >>> print ‘\n’ >>> print r’\n’ \n >>> ‘\s’ ‘\\s’ >>> r’\s’ ‘\\s’ >>> print ‘\s’ \s >>> print r’\s’ \s Unless an ‘r’ or ‘R’ prefix is present, escape sequences in strings are interpreted according to … Read more