Skip to content

Instantly share code, notes, and snippets.

View RiqueBR's full-sized avatar

RiqueBR

  • Glasgow
View GitHub Profile
@RiqueBR
RiqueBR / nvmCommands.js
Created January 15, 2020 10:34 — forked from chranderson/nvmCommands.js
Useful NVM commands
// check version
node -v || node --version
// list installed versions of node (via nvm)
nvm ls
// install specific version of node
nvm install 6.9.2
// set default version of node
@RiqueBR
RiqueBR / eslintrc.js
Last active October 10, 2019 15:40
Eslint config (eslitrc.js): Vue + Vue-a11y
module.exports = {
root: true,
env: {
node: true,
},
parserOptions: {
'parser': 'babel-eslint'
},
'overrides': [
{

Windows to UNIX Command Cheat Sheet

Windows PowerShell has several transition aliases that allow UNIX and CMD users to use familiar command names in Windows PowerShell. The most common aliases are shown in the table below, along with the Windows PowerShell command behind the alias and the standard Windows PowerShell alias if one exists.

CMD Command UNIX Command PowerShell Command PowerShell Alias
dir ls Get-ChildItem gci
@RiqueBR
RiqueBR / oneliners.js
Created April 2, 2019 08:54 — forked from mikowl/oneliners.js
👑 Awesome one-liners you might find useful while coding.
// By @coderitual
// https://twitter.com/coderitual/status/1112297299307384833
// Remove any duplicates from an array of primitives.
const unique = [...new Set(arr)]
// Sleep in async functions. Use: await sleep(2000).
const sleep = (ms) => (new Promise(resolve => setTimeout(resolve, ms)));
// Type this in your code to break chrome debugger in that line.
@RiqueBR
RiqueBR / postgres-cheatsheet.md
Created November 29, 2018 12:34 — forked from Kartones/postgres-cheatsheet.md
PostgreSQL command line cheatsheet

PSQL

Magic words:

psql -U postgres

Some interesting flags (to see all, use -h or --help depending on your psql version):

  • -E: will describe the underlaying queries of the \ commands (cool for learning!)
  • -l: psql will list all databases and then exit (useful if the user you connect with doesn't has a default database, like at AWS RDS)