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
$(document).ready(function() { | |
// On document ready.... | |
// Needs JQuery and possibly JQuery UI | |
//-----deactivate links------// | |
$("a").click(function(event) { | |
event.preventDefault(); | |
//alert("test, I'm working! I deactivated all links."); | |
}); | |
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
body { | |
background:#fff; | |
} | |
.base-wrapper{ | |
position:absolute; | |
z-index:10; | |
} | |
.content-wrapper { |
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
sudo find . -name "string-in-filename-goes-here" -exec mv {} ~/full/destination/path/goes/here/in/your/user/folder \; |
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
// Scrolling sidebar for your website | |
// Downloaded from Marcofolio.net | |
// Read the full article: http://www.marcofolio.net/webdesign/create_a_sticky_sidebar_or_box.html | |
// This has a mootools.js dependency | |
// Modified by Chris Carvey Eyetrackshop, Inc. | |
window.onscroll = function() | |
{ | |
///////////// Variables /////////////// | |
//Change selector and these numbers.... |
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
p = private('_params'); p.skip_java=false; p.skip_webcam_setup=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
Wordpress global find and replace in SQL | |
//Source: Global Find and Replace In Wordpress using MySQL | Barry Wise NJ SEO and Marketing Consultant | |
//http://www.barrywise.com/2009/02/global-find-and-replace-in-wordpress-using-mysql/ | |
//http://stackoverflow.com/questions/7548964/sql-find-and-replace-text | |
//http://stackoverflow.com/questions/421227/sql-to-search-and-replace-in-mysql | |
//http://tdot-blog.com/wordpress/6-simple-steps-to-change-your-table-prefix-in-wordpress | |
UPDATE wp_posts SET post_content = REPLACE(post_content, 'staging.server.com', 'www.productionserver.com'); | |
UPDATE [your_table_name] SET [your_table_field] = REPLACE([your_table_field], '[string_to_find]' |
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
```php | |
<?php | |
$args1 = array( | |
//choose what post type you want to pull from | |
'post_type' => array( 'news' ), | |
//speed up query by only grabbing published items | |
'post_status' => 'publish', | |
//drill down into postype with a specific taxonomy via a tax_query | |
'tax_query' => array( |
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
<ul> <?php | |
$args3 = array( | |
'post_type' => array( 'investigators' ), //set post type | |
'post_status' => 'publish', // only pull published | |
'field' => 'slug', //searching on slug field | |
'orberby' => 'name', //order by name *ignored if using custom order by plugin, set in admin* | |
'order' => 'DESC', //in descending order | |
'posts_per_page'=> '-1', //show all | |
//- - - - - - - - - - - - - |
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
```Php | |
function dateConvert($x_date){ | |
$x_date = explode('/', $x_date, 4); | |
$x_months = array('','January','Febuary', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'); | |
$x_month = intval($x_date[0]); | |
$x_day = intval($x_date[1]); | |
$x_year = $x_date[2]; | |
return ($x_months[$x_month]." ".$x_day. ", ".$x_year); | |
}``` |
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
/* Now wrapped in an if statement, checking for information to tag onto url even exists in current dom. | |
It also now encodes parentheses. | |
It was failing silently on some pages and wasn't sure why but it's fixed now. | |
I think the pinterest plugin uses multiple links and so I'm only targeting the .pin-it-button class link specfcally now. | |
I also chained a bunch of .txt stripping (.replace()) events together */ | |
if(jQuery("div.specifications").length > 0){ | |
//target the anchor/image link in the selector we're focused on... | |
var pinTarget = jQuery(".sdjpip_linkbox a.pin-it-button"); |
OlderNewer