This file contains hidden or 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
$.fn.exists = function() { | |
return $( this ).length > 0; | |
} |
This file contains hidden or 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
#!/bin/bash | |
# Author: Chmouel Boudjnah <[email protected]> | |
# Not officially supported by Rackspace only as a best effort basis :) | |
# Define yes to make it to copy to url to clipboard (via a shortened url | |
# service) You need to have the software xclip installed in your system. | |
COPY_URL_TO_CLIPBOARD=yes | |
# Containers to ignore in the list | |
CONTAINERS_TO_IGNORE=".CDN_ACCESS_LOGS" |
This file contains hidden or 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
# Restart finder: | |
killall -KILL Finder | |
# Create symbolic links: | |
ln -s /Volumes/Classic/ Classic | |
# Remove .DS_Store recursively: | |
find . -name '*.DS_Store' -type f -delete |
This file contains hidden or 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
# Restart the Apache server | |
/usr/local/zend/bin/zendctl.sh restart |
This file contains hidden or 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 | |
/** Absolute path to the WordPress directory. */ | |
if ( !defined('ABSPATH') ) | |
define('ABSPATH', dirname(__FILE__) . '/'); | |
/** Load configuration based on the server's environment **/ | |
$env = isset($_SERVER['ENVIRONMENT']) ? $_SERVER['ENVIRONMENT'] : 'dev'; | |
require_once ABSPATH . 'wp-config/wp-config.' . strtolower($env) . '.php'; | |
/** Sets up WordPress vars and included files. */ |
This file contains hidden or 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 | |
/** | |
* Remove Drupal's core system stylesheets. | |
*/ | |
function THEMENAME_css_alter(&$css) | |
{ | |
$path_system = drupal_get_path('module', 'system'); | |
$remove = array( | |
$path_system . '/system.base.css', |
This file contains hidden or 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 ckeditor_styles_wysiwyg_editor_settings_alter(&$settings, &$context) | |
{ | |
if ($context['profile']->editor == 'ckeditor') { | |
$settings['extraPlugins'] .= ',stylesheetparser'; | |
// Not necessary but removes all default styles from the CKEditor. | |
$settings['stylesSet'] = array(); | |
} | |
} |
This file contains hidden or 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
drush pm-update --svnsync --svncommit [module name] |
This file contains hidden or 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 | |
range('a', 'z'); | |
?> |
This file contains hidden or 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
SUMMARY | |
I like to use kcachegrind for doing profiling on my ruby code. Most of my development | |
is done on OSX, and while you can install kcachegrind via macports, it takes forever | |
because it has to build KDE, as well. Much to my surprise, the fine folks who | |
wrote kcachegrind also made a QT version, qcachegrind. I was able to build this on | |
OSX without too much effort, only having to install QT and GraphViz. Yippie! | |
I'm running OSX 10.6.7, with Xcode 4. My default gcc/g++ version is 4.2. I'm sure | |
it will build just fine on earlier versions of Xcode, but I haven't tested it. |
OlderNewer