Skip to content

Instantly share code, notes, and snippets.

View dualklip's full-sized avatar
🏠
Working from home

Miguel López Pesa dualklip

🏠
Working from home
View GitHub Profile
@bcnzer
bcnzer / postman-pre-request.js
Last active June 4, 2024 08:55
Postman pre-request script to automatically get a bearer token from Auth0 and save it for reuse
const echoPostRequest = {
url: 'https://<my url>.auth0.com/oauth/token',
method: 'POST',
header: 'Content-Type:application/json',
body: {
mode: 'application/json',
raw: JSON.stringify(
{
client_id:'<your client ID>',
client_secret:'<your client secret>',
@emiller42
emiller42 / gist:4982462
Last active October 17, 2022 19:00
Adding Tomcat to MAMP
1) Install MAMP normally
2) Download the latest binary of tomcat from http://tomcat.apache.org/ and extract it into the MAMP folder
(you should now have a /Applications/MAMP/apache-tomcat-version folder)
3) Create a link to the apache-tomcat folder:
ln -s /Applications/apache-tomcat-7.0.37/ tomcat
4) Make sure all the binaries are executable:
cd /Applications/tomcat/bin
@havvg
havvg / ajax-form.js
Created August 1, 2012 13:20
jQuery AJAX form submit with Twitter Bootstrap modal
jQuery(function($) {
$('form[data-async]').live('submit', function(event) {
var $form = $(this);
var $target = $($form.attr('data-target'));
$.ajax({
type: $form.attr('method'),
url: $form.attr('action'),
data: $form.serialize(),