Skip to content

Instantly share code, notes, and snippets.

@maephisto
maephisto / AWS base64 image upload
Created June 16, 2014 11:30
Node upload base64 image data to AWS
var config = {
"aws" : {
"bucket": "...",
"domain" : "...",
"prefix" : "..",
"path": "my/test/",
"credentials" : {
"accessKeyId": "...",
"secretAccessKey": "..."
}
@agray
agray / printDirective.js
Created February 27, 2015 03:42
A working angularJS print directive
(function (angular) {
"use strict";
function printDirective() {
var printSection = document.getElementById("printSection");
function printElement(elem) {
// clones the element you want to print
var domClone = elem.cloneNode(true);
if (!printSection) {
printSection = document.createElement("div");
@themorgantown
themorgantown / file.md
Last active January 9, 2019 15:18
Export script for one-click publishing to Google Adwords from Tumult Hype
/*
* Copyright (C) 2017 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@RadGH
RadGH / wc-coaches-menu-tab.php
Last active February 28, 2020 12:26
Add custom woocommerce account page/tab with title, content, and endpoint slug
<?php
if ( !defined( 'ABSPATH' ) ) exit;
// The "endpoint" key used to identify our custom menu.
// If you are adding multiple pages to the account menu, you would want to change this to an array or just get rid of the constant altogether..
define( 'MBC_PROFILE_ENDPOINT', 'coach-profile' );
/**
* Add the Coach Profile link to the list of menu items in the dashboard.