Skip to content

Instantly share code, notes, and snippets.

View landinialejandro's full-sized avatar
🎯
Focusing

Alejandro Landini landinialejandro

🎯
Focusing
View GitHub Profile
@jesperorb
jesperorb / php_form_submit.md
Last active April 30, 2024 22:27
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.

@jesperorb
jesperorb / XMLHttpRequest.js
Created February 22, 2018 12:33
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,
@DerekCaelin
DerekCaelin / gist:fb13d85e4bcd503217cc5793c27dfc08
Last active November 30, 2022 18:13
Google Form to Trello Board via Email
/*
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
@myusuf3
myusuf3 / delete_git_submodule.md
Created November 3, 2014 17:36
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