Skip to content

Instantly share code, notes, and snippets.

View jimmycann's full-sized avatar

Jimmy Cann jimmycann

View GitHub Profile
var private_key = postman.getEnvironmentVariable('private_key');
var public_key = postman.getEnvironmentVariable('public_key');
var method = request.method;
var content_type = 'application/json';
var content_md5 = '';
var request_url = request.url;
var request_uri = request_url.replace(/^.*\/\/[^\/]+/, '')
var timestamp = (new Date()).toGMTString();
@acdlite
acdlite / app.js
Last active January 20, 2023 08:23
Quick and dirty code splitting with React Router v4
// getComponent is a function that returns a promise for a component
// It will not be called until the first mount
function asyncComponent(getComponent) {
return class AsyncComponent extends React.Component {
static Component = null;
state = { Component: AsyncComponent.Component };
componentWillMount() {
if (!this.state.Component) {
getComponent().then(Component => {
@DavidWells
DavidWells / add-wordpress-settings-page.php
Created January 28, 2013 05:59
WordPress :: Add Settings Page with All Fields
<?php
/*
Plugin Name: Homepage Settings for BigBang
Plugin URI: http://www.inboundnow.com/
Description: Adds additional functionality to the big bang theme.
Author: David Wells
Author URI: http://www.inboundnow.com
*/
// Specify Hooks/Filters