Skip to content

Instantly share code, notes, and snippets.

View alexander-arce's full-sized avatar

Alex Arce alexander-arce

View GitHub Profile

Install Database and Server Dependencies

sudo apt-get update && sudo apt-get upgrade

Create Odoo User and Log Directory

  • Create the Odoo system user: sudo adduser --system --home=/opt/odoo --group odoo
@alexander-arce
alexander-arce / clean-up-arch-linux.md
Created February 21, 2025 04:38 — forked from rumansaleem/clean-up-arch-linux.md
Instructions to clean up Arch Linux (Manjaro)

Contents

  • Clean pkg cache
  • Remove unused packages (orphans)
  • Clean cache in /home
  • remove old config files
  • Find and Remove
    • duplicates
    • empty files
    • empty directories
  • broken symlinks
@alexander-arce
alexander-arce / account-linking.js
Last active February 20, 2025 22:19 — forked from jozefhruska/main.js
Auth0 Action - Account linking
/**
* Handler that will be called during the execution of a PostLogin flow.
*
* @param {Event} event - Details about the user and the context in which they are logging in.
* @param {PostLoginAPI} api - Interface whose methods can be used to change the behavior of the login.
*/
exports.onExecutePostLogin = async (event, api) => {
const axios = require("axios");
const ManagementClient = require("auth0").ManagementClient;
@alexander-arce
alexander-arce / dd.md
Created February 5, 2025 16:22 — forked from mrroot5/dd.md
Grabar iso o img en una SD o hacer backup de una tarjeta SD al ordenador con el comando dd

Backup & restore de la tarjeta SD con el comando DD

Empezamos por un backup de la tarjeta SD, luego lo copiaremos a otra tarjeta SD. En el proceso de copia se puede usar un backup que hayamos hecho o una iso descargada de Internet.

Dividimos el proceso en pasos para facilitar su comprensión y replicación.

Sistema empleado

Ubuntu 18.04 LTS.

@alexander-arce
alexander-arce / submodule-pull.sh
Created August 1, 2022 16:26 — forked from stephenparish/submodule-pull.sh
Update submodules in a git repository to the latest, but exclude one..
git submodule foreach '[ "$path" == "submodule-to-exclude" ] || git pull origin master'
SELECT pg_catalog.set_config('search_path', 'public', false);
@alexander-arce
alexander-arce / drop_objects.sql
Created May 3, 2020 00:59
Drop database objects
CREATE OR REPLACE FUNCTION drop_objects()
RETURNS VOID AS $$
DECLARE
rd_object RECORD;
v_idx_statement VARCHAR(500);
BEGIN
---1. Dropping all stored functions
@alexander-arce
alexander-arce / drop_schema.sql
Last active May 2, 2020 21:43
Drop public shcema
DROP SCHEMA public CASCADE;
CREATE SCHEMA public;
@alexander-arce
alexander-arce / prefix_issue.py
Last active April 20, 2020 17:07
Prefix commit message
#!/usr/bin/env python
# Original code https://andy-carter.com/blog/automating-git-commit-messages-with-git-hooks
# Create hooks directory mkdir -p ~/.git/hooks
# Config global hook path git config --global core.hooksPath ~/.git/hooks/
# save as prepare-commit-msg
__author__ = "Alex Arce"
__email__ = "[email protected]"
__license__ = "GPL"
__version__ = "1.0"
__credits__ = "Frank Hofmann "
@alexander-arce
alexander-arce / reset_msql_root_password.sh
Created May 15, 2018 15:22
Mysql Reset Root Password
systemctl stop mysql.service
/usr/bin/mysql_safe --skip-grant-tables
mysql -u root
use mysql;
update user set authentication_string=PASSWORD("**NEW-PASSWORD**") where User='root';
flush privileges;
quit;
systemctl start mysql.service
# Test new Password
mysql -u root -h localhost -p