Skip to content

Instantly share code, notes, and snippets.


Jack Mahoney jackmahoney

View GitHub Profile
jackmahoney / package.json
Last active Aug 29, 2015
Dev dependencies for React Karma unit testing
View package.json
"dependencies": {
"react": "^0.11.1"
"devDependencies": {
"browserify": "^4.2.1",
"karma": "^0.12.22",
"karma-chai": "^0.1.0",
"karma-mocha": "^0.1.9",
"karma-browserify": "^0.2.1",
View gist:9202683
background-image: $bg
background-image: $bg-retina
background-size: contain
//detect retina with pixel density
jackmahoney / Static typeface
Created Feb 24, 2014
Set custom font on an android custom textview. Untested code, be sure to test.
View Static typeface
public class TextHelper{
private static TypeFace typeface = null;
public static void setTypeface(Context context, TextView textview){
if(this.typeface == null){
this.typeface = Typeface.createFromAsset(context.getAssets(), "Helvetica_Neue.ttf");
jackmahoney / jm_wp_alc_med_access_ex_impl.php
Created Jul 31, 2012
Implementation of media access extension
View jm_wp_alc_med_access_ex_impl.php
<div class="clearfix">
<?php $metabox->the_field('cta-feature-img'); ?>
<?php $wpalchemy_media_access->setGroupName('cta-feature-img')->setInsertButtonLabel('Insert CTA Image')->setTab('type'); ?>
<span class="help">CTA Image - Please upload the Page CTA image at the dimensions: 280px x 146px</span>
<?php echo $wpalchemy_media_access->getField(array('name' => $metabox->get_the_name(), 'value' => $metabox->get_the_value())); ?>
<?php echo $wpalchemy_media_access->getButton(array('label' => 'Upload CTA Image')); ?>
<?php $metabox->the_field('cta-feature-img-meta'); ?>
<?php echo $wpalchemy_media_access->getMetaField(array('groupname'=>'cta-feature-img','name' => $metabox->get_the_name(), 'value' => $metabox->get_the_value())); ?>
jackmahoney / jm_wp_alchemy_media_access.php
Created Jul 31, 2012
Extension of WP_Alchemy mediaaccess class
View jm_wp_alchemy_media_access.php
* @author Jack Mahoney
class WPAlchemy_MediaAccess extends WPAlchemy_MediaAccess_Base{
public $meta_field_class_name = 'media-meta-field';
You can’t perform that action at this time.