Skip to content

Instantly share code, notes, and snippets.

@walrusk
walrusk / templates.js
Last active November 6, 2023 16:21
Bold Options Templates
if (typeof window.BOLD.options.templates == 'undefined') {
window.BOLD.options.templates = {};
}
window.BOLD.options.setTemplate = function (optionType, template, overwrite = true) {
if( overwrite || typeof window.BOLD.options.templates[optionType] == 'undefined' ) {
window.BOLD.options.templates[optionType] = template;
if (typeof window.BOLD.options.app !== 'undefined') {
window.BOLD.options.app.refreshTemplates(optionType);
}
@AllThingsSmitty
AllThingsSmitty / columns.css
Last active October 1, 2017 01:24
Columns with equal height using Flexbox
@import url(http://fonts.googleapis.com/css?family=Open+Sans);
html {
background: #444;
box-sizing: border-box;
font-family: "Open Sans", sans-serif;
line-height: 1.4;
}
*, *:before, *:after {
box-sizing: inherit;
}
(function ($) {
// Creates an iframe with an embedded HipChat conversation window.
//
// Options:
// url - The url to the room to embed; required
// container - The container in which to insert the HipChat panel; required
// timezone - The timezone to use in the embedded room; required
// welcome - A welcome message to display when the room is joined; optional
// noframes - Content to include when iframes are disabled in the browser; optional
@tobi-pb
tobi-pb / migrate.sh
Last active March 3, 2023 23:34
Upgrade MAMP to Mysql 5.6
#!/bin/sh
wget http://dev.mysql.com/get/Downloads/MySQL-5.6/mysql-5.6.24-osx10.9-x86_64.tar.gz
tar xfvz mysql-5.6*
echo "stopping mamp"
sudo /Applications/MAMP/bin/stop.sh
sudo killall httpd mysqld
echo "creating backup"
@larrybotha
larrybotha / A.markdown
Last active April 2, 2024 14:37
Export multiple artboards in Adobe Illustrator to png, or pdf

Export multiple Adobe Illustrator artboards to png, jpg, pdf

This is a reference to Matthew Ericson's article Export Illustrator Layers and/or Artboards as PNGs and PDFs in case something happens to happen to the article, and if I just forget where to find the exporter online.

Usage

  • Drop MultiExporter.js into /Applications/Adobe\ Illustrator\ CS6/Presets.localized/en_GB/Scripts
  • Restart Illustrator
@lgladdy
lgladdy / grunt-sitemap.php
Created April 13, 2014 14:25
Grunt Sitemap Generator plugin for Wordpress
<?php
/**
* Plugin Name: Grunt Sitemap Generator
* Plugin URI: http://www.github.com/lgladdy
* Description: Generate a JSON list of every page on a site so it can be used with grunt and uncss. Create a folder in /wp-content called mu-plugins, and drop this code into that folder, as grunt-sitemap.php
* Author: Liam Gladdy
* Author URI: http://gladdy.co.uk
* Version: 1.0
*/
@wturnerharris
wturnerharris / class-membership.php
Last active February 15, 2019 12:46
Class to make things members-only in WordPress.--This class depends on a custom capability called 'is_approved_member' for user member access and the custom post meta key '_members_only' as a post-level custom field.
<?php
/**
* Custom class for WP_Membership routines.
*
*
* @package WP_Membership
* @since WP_Membership 0.1
*/
if(realpath(__FILE__) === realpath($_SERVER["SCRIPT_FILENAME"]))
// Get The Page ID You Need
get_option( 'woocommerce_shop_page_id' );
get_option( 'woocommerce_cart_page_id' );
get_option( 'woocommerce_checkout_page_id' );
get_option( 'woocommerce_pay_page_id' );
get_option( 'woocommerce_thanks_page_id' );
get_option( 'woocommerce_myaccount_page_id' );
get_option( 'woocommerce_edit_address_page_id' );
get_option( 'woocommerce_view_order_page_id' );
get_option( 'woocommerce_terms_page_id' );
@phaedryx
phaedryx / summary
Last active June 14, 2024 04:58
Loyalty and Layoffs by David Brady
Original text here: https://whydavewhy.com/2013/08/16/loyalty-and-layoffs/