Skip to content

Instantly share code, notes, and snippets.

View landinialejandro's full-sized avatar
🎯
Focusing

Alejandro Landini landinialejandro

🎯
Focusing
View GitHub Profile
@landinialejandro
landinialejandro / XMLHttpRequest.js
Created May 19, 2022 23:22 — forked from jesperorb/XMLHttpRequest.js
XMLHttpRequest example
/****************
* GET REQUEST *
****************/
/* We create a new request-object that will handle the transaction between the server/database
* and the client (me/us/the browser). */
var request = new XMLHttpRequest();
/*
* We add a listener to the request which will listen to when the state changes,
@landinialejandro
landinialejandro / php_form_submit.md
Created May 19, 2022 23:21 — forked from jesperorb/php_form_submit.md
PHP form submitting with fetch + async/await

PHP Form submitting

If we have the following structure in our application:

  • 📁 application_folder_name
    • 📄 index.php
    • 📄 handle_form.php
    • 📄 main.js

And we fill our index.php with the following content just to get a basic website with a form working. You should be able to run this through a php-server of your choice.

/*
If you want entries on a Google form to auto-create a Trello card,
you can follow the steps below.
There are two ways to connect a Google form to a Trello board. One of them
involves using the Trello API. This version instead works by sending an email to a
Trello board's private email address and then it creates cards based off the content
of the email.
Trello will make a card with a title that matches the "subject" line of the
@landinialejandro
landinialejandro / delete_git_submodule.md
Created May 15, 2021 01:47 — forked from myusuf3/delete_git_submodule.md
How effectively delete a git submodule.

To remove a submodule you need to:

  • Delete the relevant section from the .gitmodules file.
  • Stage the .gitmodules changes git add .gitmodules
  • Delete the relevant section from .git/config.
  • Run git rm --cached path_to_submodule (no trailing slash).
  • Run rm -rf .git/modules/path_to_submodule (no trailing slash).
  • Commit git commit -m "Removed submodule "
  • Delete the now untracked submodule files rm -rf path_to_submodule
@landinialejandro
landinialejandro / git_shortcuts
Created April 10, 2019 12:25
Git: configurando shorts cuts in git
## shortcut lg para el log
git config --global alias.lg "log --oneline --decorate --all --graph"
## shortcut s para el status
git config --global alias.s "status -s -b"
## edit config para ver los alias
git config --global -e