Skip to content

Instantly share code, notes, and snippets.

View juelvaldivia's full-sized avatar
:octocat:
Working from home

Juel juelvaldivia

:octocat:
Working from home
View GitHub Profile
function hitTheLottery(amountToWithdraw) {
// denominaciones de billetes
const denominations = [1, 5, 10, 20, 100]
// declaracion de variables dinero entregado y billetes en 0
let delivered = 0;
let bills = 0;
// se ordenan las denominaciones en orden descendente
function diagonalDifference(matrix) {
// declara los arreglos vacios a sumar
const leftDiagonal = [];
const rightDiagonal = [];
// regresa un arreglo con la diagonal de izquierda a derecha de la matriz
matrix.forEach((element, position) => {
// obtiene la posicion invertida de la matriz
const positionRight = (matrix.length - (position + 1));
$ sudo pacman -S rabbitmq
$ sudo systemctl enable --now rabbitmq
$ sudo rabbitmq-plugins enable rabbitmq_mqtt
$ sudo rabbitmq-plugins enable rabbitmq_management
$ sudo rabbitmqctl add_user admin1 admin1
$ sudo rabbitmqctl set_permissions -p / admin1 ".*" ".*" ".*"
$ sudo rabbitmqctl set_user_tags admin1 management administrator
// 1. Write a function that evaluates if that word is compund or not (it should recieve an string as input).
// 2. Compound words examples: hotdog, goodbye, newspaper.
// 3. Not compound words: catdog, hello, news
const wordDictionary = [
'good',
'bye',
'news',
'paper',
'hot',
# How to Install homebrew on Manjaro
> Steps required to install homebrew on Manjaro Linux
## Steps
1. Install base-devel
pacman -Syu # CAUTION: this updates the whole system
pacman -S base-devel