Skip to content

Instantly share code, notes, and snippets.

View package.json
{
"name": "smartweb-version-2",
"version": "0.0.0",
"private": true,
"scripts": {
"build": "rm -rf dist && webpack --mode development --config webpack.server.config.js && webpack --mode development --config webpack.dev.config.js",
"start": "node ./server/app.js"
},
"engines": {
"node": ">= 8.0.0",
View gist:ef41e555ad925fe86b1a5b78fbca5968
Verifying my Blockstack ID is secured with the address 14SiwJBwpgLUTV54HXFNdYF2Lii3LS6KrP https://explorer.blockstack.org/address/14SiwJBwpgLUTV54HXFNdYF2Lii3LS6KrP
View keybase.md

Keybase proof

I hereby claim:

  • I am cam5 on github.
  • I am cameronhurd (https://keybase.io/cameronhurd) on keybase.
  • I have a public key whose fingerprint is 5F9E 7497 89CA 536D B0C3 0589 53AF CFDF 3CA9 B798

To claim this, I am signing this object:

@cam5
cam5 / dropkick.js
Created Jun 18, 2014
Resize a dropkick.js container to fit multiline selections
View dropkick.js
$('select').dropkick({
change: function(value, label) {
var lb = $('.dk_label:contains(' + label + ')'),
ct = lb.parents('.dk_container');
ct.css('height', lb.css('height'));
}
});
View ReAligning WP post ids
<?php
$id_map = array();
$update = array();
$posts = $db->query("SELECT * from wp_posts");
for ($count = 1; $count <= $posts->num_rows; $count++) {
$row = $posts->fetch_assoc();
$id_map[$row['ID']] = $count;
@cam5
cam5 / uikit-hooks.less
Created Nov 29, 2013
All the available hooks in uikit, as of Nov 2013
View uikit-hooks.less
.hook-alert() {}
.hook-alert-success() {}
.hook-alert-warning() {}
.hook-alert-danger() {}
.hook-article-title() {}
.hook-article-meta() {}
.hook-article-lead() {}
.hook-article-divider() {}
.hook-badge() {}
.hook-badge-success() {}
@cam5
cam5 / single-product-reviews-excerpt.php
Created Sep 18, 2013
I used a few lines in the `single-product-reviews.php` woocommerce template to unhook jetpack on only product pages. Otherwise, it overrides the review form. Just calling the `Jetpack_Comments` class and removing those actions before the `comment_form()` was enough to selectively deactivate 'em. Note: your `single-product-reviews.php` might be i…
View single-product-reviews-excerpt.php
$jp = new Jetpack_Comments;
remove_action('comment_form_before', array($jp, 'comment_form_before'));
remove_action('comment_form_after', array($jp, 'comment_form_after'));`
comment_form( apply_filters( 'woocommerce_product_review_comment_form_args', $comment_form ) );
@cam5
cam5 / bp-custom.php
Created Jun 12, 2013
Link out the default ellipses that appear on forum updates in BuddyPress!
View bp-custom.php
<?
class Better_Ellipses {
static $link;
static function init() {
add_action('bbp_new_reply', array(__CLASS__, 'get_reply_info'), 1, 2);
add_action('bbp_new_topic', array(__CLASS__, 'get_topic_info'), 1, 1);
add_filter('bp_excerpt_append_text', array(__CLASS__, 'link_ellipses') );
}
static function link_ellipses($string) {
return " <a href='" . self::$link . "'>[&hellip;]</a>";
You can’t perform that action at this time.