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 directionsService = new google.maps.DirectionsService(); | |
var request = { | |
origin : 'Melbourne VIC', // a city, full address, landmark etc | |
destination : 'Sydney NSW', | |
travelMode : google.maps.DirectionsTravelMode.DRIVING | |
}; | |
directionsService.route(request, function(response, status) { | |
if ( status == google.maps.DirectionsStatus.OK ) { |
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
$('#myImage').resizeToParent(); |
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
127.0.0.1 project1.localhost | |
127.0.0.1 project2.localhost |
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
gem 'will_paginate', '~> 3.1.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
<?php | |
error_reporting( 0 ); // don't let any php errors ruin the feed | |
$username = 'username'; | |
$number_tweets = 4; | |
$feed = "http://api.twitter.com/1/statuses/user_timeline.json?screen_name={$username}&count={$number_tweets}&include_rts=1&callback=?"; | |
$cache_file = dirname(__FILE__).'/cache/'.'twitter-cache'; | |
$modified = filemtime( $cache_file ); | |
$now = time(); |
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
$.getJSON('/resources/twitter_cache.php', function(data) { | |
$.each(data, function(i) { | |
console.log( data[i] ); | |
// do something with tweet | |
}); | |
}); |
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 my_custom_submenu() { | |
global $post; | |
$menu_items = wp_get_nav_menu_items('Menu'); | |
$current_menu_id = null; | |
// get current top level menu item id | |
foreach ( $menu_items as $item ) { |
NewerOlder