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 //get tweets | |
function get_tweets($s) { | |
$url = 'http://search.twitter.com/search.json?q=' . urlencode($s); | |
//set up var for holding tweets | |
$local_tweets = ''; | |
//check for cache from 5 minutes ago | |
if(get_transient('bodyadorned_tweets_short')) { | |
$local_tweets = get_transient('bodyadorned_tweets_short'); | |
//if it isn't found, try to update tweets | |
} else { |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>comment</key> | |
<string>Crafted with love and passion by Bernat Fortet, special treatment for Front End coding: HTML, CSS, LESS, JADE, JS... more coming soon </string> | |
<key>author</key> | |
<string>Bernat Fortet</string> | |
<key>name</key> | |
<string>Bernat's FrontEnd Deligh</string> |
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
//check for mobile devices | |
//modified from http://bit.ly/nMEXh4 | |
var ua = navigator.userAgent; | |
var checker = { | |
iphone: ua.match(/(iPhone|iPod)/), | |
ipad: ua.match(/(iPad)/), | |
blackberry: ua.match(/BlackBerry/), | |
android: ua.match(/Android/) |
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
//the next few lines strip "or Create an Account" from the log-in menu option | |
//I usually set the overall navigation to display:none; in my CSS if I know js is enabled | |
//I use Modernizr and check for the js class on the <html> tag with the style selector for my menu | |
//like: .js #navigation { display: none; } | |
//You'll want to add a class or ID to the <div> containing the log-in/log-out link | |
//usual output (with added ID): | |
//<li> | |
// <div id="log_in_options"> | |
// <a onclick="" href="[url]">Sign in</a> or <a onclick="" href="[url]">Create an account</a> |
NewerOlder