Skip to content

Instantly share code, notes, and snippets.

View DTown's full-sized avatar

Tim Christmann DTown

View GitHub Profile
@bcnzer
bcnzer / postman-pre-request.js
Last active April 16, 2025 06:21
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>',
@bartrail
bartrail / localStorageHandler
Created June 6, 2012 14:15
a Simple local storage handler using jStorage and jQuery. Use it to save objects/arrays under one namespace with a customized object structure
var localStorageHandler = function(namespace, dataStructure) {
this.namespace = namespace;
this.dataStructure = dataStructure ? dataStructure : {};
this.saveItem = function(id, data) {
var oldData = this.getItem(id);
var saveData = $.extend(true, {}, oldData, data);