Skip to content

Instantly share code, notes, and snippets.

View luisalcarasr's full-sized avatar
🛸
Creating amazing things with React.

Luis Alcaras luisalcarasr

🛸
Creating amazing things with React.
View GitHub Profile
@luisalcarasr
luisalcarasr / .sh
Created May 11, 2022 04:54
MongoDB in Fedora 36
sudo dnf install mongodb-org-server mongodb-org-shell mongodb-database-tools mongodb-org-mongos mongodb-mongosh
@luisalcarasr
luisalcarasr / .vimrc
Created April 6, 2022 16:39
Basic Git configuration
syntax on
set number
set relativenumber
set sw=2
set ts=2
set autoindent
// This file was initially generated by Windows Terminal 1.1.2233.0
// It should still be usable in newer versions, but newer versions might have additional
// settings, help text, or changes that you will not see unless you clear this file
// and let us generate a new one for you.
// To view the default settings, hold "alt" while clicking on the "Settings" button.
// For documentation on these settings, see: https://aka.ms/terminal-documentation
{
"$schema": "https://aka.ms/terminal-profiles-schema",
@luisalcarasr
luisalcarasr / .js
Created May 20, 2020 14:43
Deep JSON.parse
/**
* Converts numbers or booleans that are in text string format to native types.
* @autor Luis Alcaras <luisalcarasr@gmail.com>
* @version 1.0.2
* @param {Object|Array|Number|String|Boolean} objectOrArray Element to be converted.
* @return {Object|Array|Number|String|Boolean}
*/
function parse(objectOrArray) {
if (Array.isArray(objectOrArray)) {
return objectOrArray.map(parse);
@luisalcarasr
luisalcarasr / .sql
Created July 6, 2019 18:33
Change PostgreSQL connection from Peer to MD5
sudo -u postgres psql
\password
/etc/postgresql/<version>main/pg_hba.conf
# TYPE DATABASE USER ADDRESS METHOD
local all all md5
@luisalcarasr
luisalcarasr / .sql
Last active June 16, 2020 05:39
Remove unix socket plugin from MariaDB 10
USE mysql;
UPDATE user SET plugin = "" WHERE user = "root";
UPDATE user SET password = PASSWORD("root") WHERE user = "root";
FLUSH PRIVILEGES;