⌘T | go to file |
⌘⌃P | go to project |
⌘R | go to methods |
⌃G | go to line |
⌘KB | toggle side bar |
⌘⇧P | command prompt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//SPOTLIGHT SLIDER LAYOUT 3 | |
jQuery("#slider3 > ul").tabs({fx:{opacity: "toggle"}}).tabs("rotate", <?php echo $con_spotlight_duration; ?>000, false); | |
var rotateHoverHandler = { | |
hoveredOver: false, | |
stopSlider: false, | |
isRotating: true, | |
hoverOver: function(){ | |
jQuery("#slider3 > ul").tabs("rotate", null, false); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var events = { | |
options: null, | |
getEventsList: function(){ | |
console.log('events.getEvents() private: got here'); | |
var opts = { | |
Limit: 15 | |
}; | |
dynode.query("event_types_timestamp", "Viewed Product", opts, events.getEventDetails); | |
}, |
Writing git commit comments is boring. Following this guide will make it easy to make it much more fun. Inspired by this comic, Clickbait Headline Generator and this article used as a reference.
- The List
Good for fixes that required a number of discrete methods to fix something"10 antipaterns everyone knows are actually just lies"
"5 weird ways spinbox changed in just 2 weeks, the 4th will leave you speachless."
- Case Studies
Perfect for unit test commit comments (you can even use the GH Issue number as the case study number)"Case Study #1543: Does spinbox still allow exceeding maximum through manual input?"
- `"Case Study #24: Does repeater still
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
master | |
$ new menu | |
#################################################################################### | |
Creating new branch: `menu` | |
#################################################################################### | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ commit "got the array passing to work (finally, OMG this was ridiculous)" -a | |
#################################################################################### | |
Committing changes to branch: `menu` | |
#################################################################################### | |
Checking status... | |
------------------------------------------------------------------------------------ | |
$ git status |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//all of this replaces line 147 (NOT 149!!) | |
$db_conn_uri = $dbhost; | |
if(isset($dbport) && !empty($dbport)){ | |
$db_conn_uri .= ":" . $dbport;//could be improved by adding a check to make sure that $dbport doesn't start with ":" before tagging that on for them | |
} | |
$cn = @mysql_pconnect($db_conn_uri, $dbuser, $dbpasswd); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//you can have as many of these as you want... | |
your_prefix_register_field('field_id', 'field label', 'dashboard page', 'section_id', array('callback', 'params', 'can', 'go', 'here')); | |
your_prefix_register_field('field_id2', 'field label', 'dashboard page', 'section_id'); | |
your_prefix_register_field('field_id3', 'field label', 'dashboard page', 'section_id'); | |
your_prefix_register_field('field_ida', 'field label', 'dashboard page', 'section_id'); | |
your_prefix_register_field('field_idz', 'field label', 'dashboard page', 'section_id'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function your_global_callback($field){ | |
$selected = get_option($field["id"]); | |
if($field["type"] == "text"){ | |
?> | |
<input type="text" name="<?php echo $field["id"]; ?>" id="<?php echo $field["id"]; ?>" value="<?php echo $selected ?>"> | |
<?php | |
}else if($field["type"] == "checkbox"){ | |
if($selected){ | |
$selText = ' checked="checked" '; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function your_prefix_your_section_callback_function(){ | |
settings_fields('your_settings_group');//make hidden fields print out in form | |
echo "<p>Stuff for the user here</p>"; | |
} |