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 / rsa-keys-generation
Created April 29, 2021 12:48
Generar claves privada y pública rsa #ssh #ssl #rsa #keys #git
```
ssh-keygen -o
```
@ramingar
ramingar / percona-bootstrap.md
Last active July 9, 2020 08:51
percona-bootstrap #percona #mysql #bootstrap #ubuntu

Bootstrap Percona first node

sudo /etc/init.d/mysql bootstrap-pxc

para probar que todo funcionó:

mysql -u <user> -p
#show status like 'wsrep%';
@ramingar
ramingar / mysql-import-csv-to-table.md
Created May 22, 2020 10:34
Importa un csv a una tabla mysql #mysql #import #csv #terminal
 load data local infile 'file.csv' into table table
 fields terminated by ','
 enclosed by '"'
 lines terminated by '\n'
 (column1, column2, column3,...)
@ramingar
ramingar / mysql-result-rows-to-csv-file.md
Last active May 22, 2020 10:35
Exporta los resultados de una tabla a un archivo csv #mysql #import #csv #terminal
SELECT order_id,product_name,qty
FROM orders
WHERE foo = 'bar'
INTO OUTFILE '/var/lib/mysql-files/orders.csv'
FIELDS TERMINATED BY ','
ENCLOSED BY '"'
LINES TERMINATED BY '\n';
@ramingar
ramingar / pack-objects-died-signal-9.md
Created January 27, 2020 13:45
error pack objects died signal 9 #git #error #commands
error: pack-objects died of signal 9
error: remote unpack failed: eof before pack header was fully read
error: failed to push some refs to 'user@server:url'

para solucionar este error:

git config --global pack.windowMemory "32m"
@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 November 28, 2019 10:00
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,''),',',