Skip to content

Instantly share code, notes, and snippets.

View jimmitchell's full-sized avatar

Jim Mitchell jimmitchell

View GitHub Profile
@jimmitchell
jimmitchell / Disable Default Dashboard Widgets.php
Last active August 29, 2015 13:56
Disable Default WordPress Dashboard Widgets
/*
Disable Default Dashboard Widgets
@ http://digwp.com/2014/02/disable-default-dashboard-widgets/
*/
function disable_default_dashboard_widgets() {
global $wp_meta_boxes;
// wp..
unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_activity']);
unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_right_now']);
unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_recent_comments']);
@jimmitchell
jimmitchell / Faux Visualforce Required Field.html
Last active July 3, 2016 00:19
Force.com Apex code for making a field appear to be required on a Visualforce page.
<!-- update "Object_Name__c" with your Object, and "Field_Name__c" with your Field -->
<apex:pageblocksectionitem helpText="{!$ObjectType.Object_Name__c.Fields.Field_Name__c.inlineHelpText}">
<apex:outputlabel value="{!$ObjectType.Object_Name__c.fields.Field_Name__c.label}" />
<apex:outputpanel layout="block" styleClass="requiredInput">
<apex:outputpanel layout="block" styleClass="requiredBlock"/>
<apex:inputfield value="{!Object_Name__c.Field_Name__c}" />
</apex:outputpanel>
</apex:pageblocksectionitem>
@jimmitchell
jimmitchell / cm_custom.css
Created September 2, 2011 14:55
Custom CSS for Use With Chrome Minimalist for Google Calendar
#calendars_my div[class='calListRow']:last-child {display:none !important;}
div[id='currentDate:0'] {font-weight: bold;font-size:1.26em;}
@jimmitchell
jimmitchell / a_button.css
Created August 16, 2011 17:07
CSS Button Style
/* css styles to create nice buttons out of anchor tags */
a.button {
border: 1px solid #bbb;
background: #ddd;
background: -webkit-gradient(linear, left top, left bottom, from(#eee), to(#ccc));
background: -moz-linear-gradient(top, #eee, #ccc);
padding: 6px 15px;
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
border-radius: 4px;