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
# 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
// 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',
$ 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
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));
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
@juelvaldivia
juelvaldivia / ALIAS GIT
Created March 18, 2020 14:56
ALIAS GIT
alias add="git add ."
alias commit="git commit -am"
alias feature="git flow feature"
alias release="git flow release"
alias hotfix="git flow hotfix"
alias check="git checkout"
alias branch="git branch"
alias develop="git checkout develop"
alias master="git checkout master"
alias deploy_prod="git push production master"
ERROR: Service 'php-fpm' failed to build: OCI runtime create failed: container_linux.go:346:
starting container process caused "process_linux.go:297: applying cgroup configuration for
process caused \"open /sys/fs/cgroup/docker/cpuset.cpus.effective: no such file or directory\"": unknown
SOLUTION
sudo dnf install -y grubby && \
sudo grubby \
--update-kernel=ALL \
Para verificar si está o no activado SELinux
$ /usr/sbin/sestatus
SELinux status: disabled/enable
Para desactivar es necesario modificar el archivo de configuración de SELinux
en la opción "SELINUX=disabled"
$ vi /etc/selinux/config
create sequence table_id_table_seq;
ALTER TABLE public.table ALTER COLUMN id_table SET DEFAULT nextval('"table_id_table_seq"'::regclass);
alter sequence table_id_table_seq
owner by table.id_table;
// valor por defecto en autoincrementable
ALTER SEQUENCE table_id_table_seq RESTART WITH 4
__author__ = 'juel'
# -*- coding: 850 -*-
from eralchemy import render_er
import getpass
import psycopg2
salida = False
while not salida :
print 'Entre las credenciales del servidor--->'