Skip to content

Instantly share code, notes, and snippets.

View jtsternberg's full-sized avatar
😎
Awesome Motive-ing

Justin Sternberg jtsternberg

😎
Awesome Motive-ing
View GitHub Profile
@jtsternberg
jtsternberg / om.Campaign.normalize.js
Created November 15, 2018 18:08 — forked from brianaohern/om-Campaign-init.js
Runs just before any split test elements are normalized.
document.addEventListener('om.Campaign.normalize', function(event) {
console.log(event.detail.Campaign);
} );
@jtsternberg
jtsternberg / variablefunctioncallback.html
Last active August 28, 2018 17:40 — forked from thomasgriffin/variablefunctioncallback.js
OptinMonster Dynamic Replacement API - variable function callback example.
<script type="text/javascript">
window.OMCustomVariables = function(setCustom) {
setCustom('name', 'Thomas');
};
</script>
@jtsternberg
jtsternberg / customvariablefunction.html
Last active August 28, 2018 17:06 — forked from thomasgriffin/customvariablefunction.js
OptinMonster Dynamic Replacement API - function callback example.
<script type="text/javascript">
function OMCustomVariables(setCustom) {
setCustom('name', 'Thomas');
}
</script>
@jtsternberg
jtsternberg / markdown.css
Last active June 30, 2018 22:42 — forked from imjasonh/markdown.css
Render Markdown as unrendered Markdown (see http://jsbin.com/huwosomawo)
* {
font-size: 12pt;
font-family: monospace;
font-weight: normal;
font-style: normal;
text-decoration: none;
color: #333;
cursor: default;
margin: 0;
padding: 0;
<?php
function maybe_disable_cmb2_styles( $enabled ) {
if ( ! is_admin() ) {
$enabled = false;
}
return $enabled;
}
add_filter( 'cmb2_enqueue_css', 'maybe_disable_cmb2_styles' );
@jtsternberg
jtsternberg / gethooks
Last active July 8, 2016 02:02 — forked from ramiabraham/gethooks
Copy all actions and filters in a plugin and save to a file.
#!/bin/bash
#
# Prints all hooks in a dir to a .log file.
#
# Permissions issues:
# run: chmod +x gethooks
#
# gist: https://gist.github.com/ramiabraham/e8356e00130351ddcbe2c62125e6c52a
#
# Easy usage:
@jtsternberg
jtsternberg / ugh.php
Last active June 9, 2016 17:20 — forked from bradp/ugh.php
dont_do_this
<?php
//dis like the best code ever
function register() {
$msg = '';
if ( empty( $_POST ) ) {
return 'Fill out the form, dummy!';
}
<?php
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
/**
* Grid of products.
*
* @author WooThemes
* @category Widgets
<?php
// Do this so that the chapel_get_client_options WP_Query/get_posts ONLY happens
// when the field is run (otherwise this query will run on EVERY wordpress page-load,
// whether page has CMB2 fields or not)
public function chapel_get_client_options_cb() {
return chapel_get_client_options( array( 'post_type' => ' clients ', 'numberposts' => -1 , 'orderby' => 'name', 'order' => 'ASC' ) );
}
function chapel_project_metaboxes() {
@jtsternberg
jtsternberg / wdscamp_noms.md
Last active September 21, 2015 19:28 — forked from ramiabraham/wdscamp_noms.md
[wdscamp 2015 wednesday dinner]

Chana Masala

feed like 5-6 people

  • 1 (15 ounce) can chickpeas
  • 1 onion, chopped
  • 1 tomatoes, chopped
  • 1 green chili pepper, chopped
  • 4 -5 garlic cloves, chopped
  • 1 inch gingerroot, chopped