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
<Directory "/Users/username/Sites/"> | |
# Options Indexes MultiViews | |
Options Indexes MultiViews FollowSymLinks | |
AllowOverride All | |
Order allow,deny | |
Allow from all | |
</Directory> |
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
NeedsTimingInfo = true; | |
var start = Date.now(), | |
triggered = false, | |
prev; | |
var PluginParameters = [ | |
{ | |
name: "Window Length", | |
defaultValue: 80, |
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
var shift = 0; | |
NeedsTimingInfo = true; | |
function HandleMIDI(event) { | |
event.pitch += shift; | |
event.send(); | |
} | |
function ProcessMIDI () { |
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
function remove_img_dimensions($html) { | |
$dom = new DOMDocument; | |
$dom->loadHTML($html); | |
$imgs = $dom->getElementsByTagName('img'); | |
foreach ($imgs as $img) { | |
$img->removeAttribute('width'); | |
$img->removeAttribute('height'); | |
} |
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
.embed-wrap { | |
position: relative; | |
padding-top: 25px; /* IE6 workaround*/ | |
height: 0; | |
object, embed, iframe { | |
position: absolute; | |
top: 0; | |
left: 0; | |
width: 100%; |
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
default_run_options[:pty] = true # Must be set for the password prompt from git to work | |
# Tell Capistrano to use agent forwarding with this command. uses your local keys instead of keys installed on the server. | |
ssh_options[:forward_agent] = true | |
ssh_options[:keys] = %w('~/.ssh/id_rsa.pub') | |
# shared hosts e.g. hostgator prevent filfefs with high (>5) group privileges from being run (rightfully) | |
set :group_writable, false | |
# You will probably have to update any submodules that are have an SSH remote to use https e.g. |
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
function createSrcCall(tabId, src, callback) { | |
return function () { | |
if (callback !== undefined) { | |
chrome.tabs.executeScript(tabId, {file: src}, callback); | |
} else { | |
chrome.tabs.executeScript(tabId, {file: src}); | |
} | |
}; | |
} |
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 | |
// Add to functions.php | |
// Make sure your custom post type has 'page-attributes' in its supports array | |
// Adjust the 'typeN's to your custom post types | |
// the first type | |
add_filter( 'wp_insert_post_data', 'set_menu_order', 10, 2 ); | |
function set_menu_order( $data, $postarr ) { | |
global $post; | |
$pt = $data['post_type']; | |
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 | |
// Add to functions.php | |
// Add page-slug to body | |
function add_body_class( $classes ) | |
{ | |
global $post; | |
if ( isset( $post ) ) { | |
if (substr($post->post_type, 0, 4) == 'page') { | |
$classes[] = $post->post_type . '-' . $post->post_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
This is usually caused by using multiple different ssh keys for a server without turning on IdentitiesOnly. | |
To get access to your account, get your host to run ssh-add -D to clear the identities. Once you are logged back in, add this to your ~/.ssh/config file: | |
IdentitiesOnly yes | |
via: http://superuser.com/questions/187779/too-many-authentication-failures-for-username |