Skip to content

Instantly share code, notes, and snippets.

View ramingar's full-sized avatar
:octocat:
Not a PRO user

Rafael Minguet ramingar

:octocat:
Not a PRO user
View GitHub Profile
@ramingar
ramingar / set-timezone-to-utc0-mysql-ubuntu.md
Created January 2, 2020 10:19
Asigna el timezone de una mysql ubuntu a UTC+0 #mysql #timezone #ubuntu #linux

en /etc/mysql/mysql.conf.d/mysqld.cnf o /etc/mysql/mariadb.conf.d/50-server.cnf

[mysqld]
default_time_zone='+00:00'
@ramingar
ramingar / enable-disable-ubuntu-firewall.md
Created December 27, 2019 12:56
habilitar / deshabilitar firewall ubuntu #ubuntu #linux #firewall
sudo ufw enable
sudo ufw disable
sudo ufw status
@ramingar
ramingar / solved-microsoft-excel-file-is-locked-for-editing-in-use-issue.md
Last active February 13, 2025 18:25
Archivo excel está bloqueado para editar porque ya está en uso por otro usuario #excel #locked #shared

Source: http://www.repairmsexcel.com/blog/solved-microsoft-excel-file-is-locked-for-editing-in-use-issue

How to Fix Microsoft Excel File locked for Editing?

In order to solve this issue, we will disconnect the user from the file and allow another user to get the complete accessibility, follow the below given step:

Step 1: First you have to note down the path to the file, and the file name.

Step 2: Open the run dialogue box, press the Windows Key + R from your keyboard to open up the Run dialog box.
@ramingar
ramingar / mysql-root-password-change.md
Created October 21, 2019 16:12
Cambiar contraseña root mysql #mysql
@ramingar
ramingar / mysql-hierarchical-data-from-parent-to-children-1.md
Last active September 23, 2019 13:45
Dado un id, buscar toda la jerarquía de hijos asociados #sql #hierarchy #children #mysql
select      
            p4.parties_id as parent4_id,
            p3.parties_id as parent3_id,
            p2.parties_id as parent2_id,
            p1.parties_id as parent_id,
            p1.id as party_id,
            p1.name,
            concat(
 if(p4.parties_id,p4.parties_id,''),',',
@ramingar
ramingar / pagination-right-way.md
Last active September 23, 2019 13:40
Pagination, the right way #sql #pagination #limit #offset #fetch #mysql
@ramingar
ramingar / mysql-hierarchical-data-from-parents-to-children.md
Last active August 19, 2019 21:49
Dado un id, buscar toda la jerarquía recursiva de padres asociados #sql #hierarchy #parent #recursive
@ramingar
ramingar / sonarqube-quality-gate-teamcity-build-step.md
Created June 19, 2019 08:05
Check SonarQube's Quality Gate from TeamCity's build step #sonarqube #teamcity #qualitygate #quality #gate #ci #continousintegration

Realiza un curl, recupera la respuesta, busca si aparece la palabra ERROR en la response, cuenta cuantas veces ocurre y si ocurre envía un exit 2 para que falle. Si 0 es que response no devolvió ERROR en ningún sitio.

echo "============> SonarQube's Quality Gate <============" &&
#Initializing two variables 
ERR_COUNT=`curl http://127.0.0.1:9000/api/qualitygates/project_status?projectKey=MyAwesomeProjectKey -L | grep -Eo 'ERROR' | wc -l`

#Check whether they are equal 
if [ $ERR_COUNT -eq 0 ] 
then 
@ramingar
ramingar / js-conversion-table.md
Created April 17, 2019 07:10
Conversiones de tipo en JS #js #javascript #type #conversion
@ramingar
ramingar / node-finally-polyfill.md
Created January 18, 2019 09:17
Finally polyfill para versiones de node antiguas #node #finally #polyfill
Promise.prototype.finally = function (cb) {
    const res = () => this;
    return this.then(value =>
            Promise.resolve(cb({state: "fulfilled", value})).then(res)
        , reason =>
            Promise.resolve(cb({state: "rejected", reason})).then(res)
    );
};