Skip to content

Instantly share code, notes, and snippets.

View treighton's full-sized avatar

Treighton Mauldin treighton

View GitHub Profile
@treighton
treighton / map.js
Created April 19, 2022 17:26
map example 2
import * as L from 'leaflet';
import * as EL from 'esri-leaflet';
/**
* Init function
*
* @return Map object
*/
const initMap = async () => {
if ( !document.querySelector( '#map' ) ) {
import * as L from 'leaflet';
import * as EL from 'esri-leaflet';
import {slugify, deSlugify} from '../../shared/slugify';
/**
* Init function
*
* @return Map object
*/
const init = () => {
@treighton
treighton / tdee.js
Created August 12, 2019 21:41 — forked from qmmr/tdee.js
Calculate your BMR & TDEE
// Total Daily Energy Expenditure
function TDEE (data) {
this.weight = data.weight || 60
this.height = data.height || 180
this.age = data.age || 20
this.sex = data.sex || 'male'
this.bodyType = data.bodyType || 'ectomorph'
this.numberOfWorkouts = data.numberOfWorkouts || 3
this.durationOfWorkout = data.durationOfWorkout || 45
this.ratios = data.ratios || {
@treighton
treighton / wordpress-custom-taxonomy-urls.php
Last active October 10, 2017 18:00
Rewrite WP Taxonomy URLS
<?php
function custom_post_type() {
$labels = array(
'name' => _x( 'Resources', 'Resource General Name', 'namspace' ),
'singular_name' => _x( 'Resource', 'Resource Singular Name', 'namspace' ),
'menu_name' => __( 'Resources', 'namspace' ),
'name_admin_bar' => __( 'Resource', 'namspace' ),
'archives' => __( 'Resource Archives', 'namspace' ),

Contract Killer

The popular open-source contract for web designers and developers by Stuff & Nonsense

  • Originally published: 23/12/2008
  • Revised date: 15/12/2013
  • Original post