Skip to content

Instantly share code, notes, and snippets.

[...]
if [[ "$(umask)" = "0000" ]]; then
umask 0022
fi
export DOCKER_HOST=tcp://localhost:2375
@noeRls
noeRls / .bash-prompt.sh
Created April 5, 2020 17:01
Custom bash prompt
#!/usr/bin/env bash
## Uncomment to disable git info
#POWERLINE_GIT=0
__powerline() {
# Colors
COLOR_RESET='\[\033[m\]'
COLOR_CWD=${COLOR_CWD:-'\[\e[1m\]\[\e[36m\]'}
COLOR_GIT=${COLOR_GIT:-'\[\e[1m\]\[\e[35m\]'}
@noeRls
noeRls / nodejs-custom-es6-errors.md
Created July 3, 2019 12:37 — forked from slavafomin/nodejs-custom-es6-errors.md
Custom ES6 errors in Node.js

Here's how you could create custom error classes in Node.js using latest ES6 / ES2015 syntax.

I've tried to make it as lean and unobtrusive as possible.

Defining our own base class for errors

errors/AppError.js

@noeRls
noeRls / CustomException.hpp
Created May 28, 2019 08:26
Custom Exception
#pragma once
#include <exception>
#include <string>
class CustomException : public std::exception
{
public:
CustomException(const std::string &error) : msg("[CUSTOM]: " + error) {};
~CustomException() = default;
@noeRls
noeRls / commitNorm.md
Last active December 9, 2019 20:57
Commit norm

Formating

A commit should be formated as follow: [Nature](scope): Content

Nature

  • [-] bug fix
  • [*] improvement
  • [+] add feature
  • [~] others