Skip to content

Instantly share code, notes, and snippets.

View king-11's full-sized avatar

Lakshya Singh king-11

View GitHub Profile
king-11 /
Created August 23, 2021 08:07 — forked from krisleech/
Renew Expired GPG key

Renew GPG key

Given that your key has expired.

$ gpg --list-keys
$ gpg --edit-key KEYID

Use the expire command to set a new expire date:

king-11 / laravel-ajax-form.js
Created June 24, 2020 09:00 — forked from mp035/laravel-ajax-form.js
Convert any standard HTML form to ajax by adding a few classes to the components and including this file. (see comments)
// notes on using this file:
// This file is intended to work with a standard html form the same as what you use for server side rendered laravel projects.
// The only changes you need to make to the form are:
// 1. Add the class "ajax-submit" to any form you want to be submitted via ajax.
// 2. If you have a "Cancel" button on your form, mark it with the class "form-cancel"
// 3. Add a bootstrap alert in your form, marked with the class "ajax-error-alert" and "collapse" (to keep it initally hidden). This alert will display any error messages.
// Then call the function "AttachAjaxSubmit()" after the DOM is loaded.
// NOTE: This script requires bootstrap to style the components during the submission process.