Skip to content

Instantly share code, notes, and snippets.

View marcelomgarcia's full-sized avatar

Marcelo Garcia marcelomgarcia

  • Jeddah, Saudi Arabia
View GitHub Profile

Research Data Tools Examples

Plan

Data management planning (DMP): Tools focused on enabling preparation and submisssion of data management plans:

  • DMPonline
  • Argos (machine actionable data plan)
  • RDMO (provided a comprehensive documentation in English, a demo area, and it's open source.)
@marcelomgarcia
marcelomgarcia / win_python_long_path_errors.md
Created August 2, 2023 13:15
Python Windows Long Path Problems

Problems with Windows Long Path in Python

It seems there is a limit in Windows API paths, that is causing the Digital Preservation script to fail with the message of "file not found"

>>> source_dir = Path(r"G:\GSDC High Res Photos\2023-GSDC\2023-05-31-Day 2\2023-05-31-1030-1200-Using reconciliation and migration to drive the development of more sustainable and equitable societies")
>>> dest_dir = Path(r"E:\KAUST_ARCHIVES\009_COMMUNICATIONS_AND_PUBLIC_RELATIONS\001_GLOBAL_BRANDING_AND_COMMUNICATIONS\009_001_0018\mg_test")
>>> copytree(source_dir, dest_dir)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
@marcelomgarcia
marcelomgarcia / Windows.md
Last active April 3, 2024 10:47
Configuration after a fresh install of Ubuntu
@marcelomgarcia
marcelomgarcia / movie_club_suggestions.md
Last active November 19, 2023 14:17
Suggestions for the movie club
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@marcelomgarcia
marcelomgarcia / read_user_passwords.md
Last active October 23, 2023 12:48
Using Ansible vault to read passwords in a dictionary

Read Passwords from Ansible Vault

Declaring username and password in a vault and reading the dictionary into a playbook.

The files mysql_vault and mysql_users were renamed to library_vault_key and library_vault to include other secrets than MySQL only.

The Vault

The dictionary, mysql_users has the database name as key, and the values are the username and the password. The password for the vault is in the file mysql_vault, which is a simple text file like this

@marcelomgarcia
marcelomgarcia / Git_cookbook.md
Last active January 18, 2023 10:45
Using Git

Git Cookbook

Using Git for every work.

Branch

Creating a branch

mgarcia@wsl2:~/Documents/Work/orcid-integration$ git checkout -b dockerfile_no_ssh_key
@marcelomgarcia
marcelomgarcia / powershell_venv.md
Created June 5, 2021 14:56
Starting virtual environment in Powershell

Using Virtual Environment in Powershell

Create the virtual environment

PS C:\Users\mgarcia\Documents\Work\ml> python -m venv venv

Starting the environment

@marcelomgarcia
marcelomgarcia / mysql.md
Last active May 30, 2022 08:50
MySQL tips

MySQL Daily Admin

Basic MySQL administration, and useful commands.

Location of the Database

Locating the directory with the database files

root@lthlibpub:/etc/mysql# mysqladmin -u root -p variables | grep datadir
@marcelomgarcia
marcelomgarcia / mg_tmux_conf.md
Last active December 26, 2021 17:50
tmux configuration and more