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 | |
$twitter = json_decode( | |
file_get_contents( | |
'http://twitter.com/users/show/smythsonsdeli.json', | |
false, | |
stream_context_create( | |
array( | |
'http' => array('ignore_errors' => true) | |
) | |
) |
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 | |
$token = file_get_contents( | |
'https://graph.facebook.com/oauth/access_token?client_id=APP_ID&client_secret=APP_SECRET&grant_type=client_credentials', | |
false, | |
stream_context_create( | |
array( 'http' => array('ignore_errors' => true) ) | |
) | |
); | |
$fb = json_decode( | |
file_get_contents( |
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
$("#filter").focus(); | |
$("#filter").keyup(function(){ | |
strFilter = $("#filter").val().toLowerCase(); | |
$("ul.projects li").each(function(){ | |
$(this).html().toLowerCase().match( strFilter ) ? | |
$(this).fadeIn() : | |
$(this).fadeOut() ; | |
}); | |
}); |
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
rsync -arvuz --delete --include .htaccess --exclude .git --exclude .gitignore --exclude deploy ~/beta.example.com/ ~/example.com/ |
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
$(window).scroll(function(){ | |
toScroll = $(document).height() - $(window).height() - 250; | |
if ( $(this).scrollTop() > toScroll ) { | |
// Do something | |
} | |
}); |
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
<script type="text/javascript" src="http://maps.googleapis.com/maps/api/js?sensor=false"></script> | |
<script type="text/javascript"> | |
$(function(){ | |
var latlng = new google.maps.LatLng(1.285121,103.852322), | |
map = new google.maps.Map(document.getElementById('googlemap'), { | |
zoom: 15, | |
center: latlng, | |
mapTypeId: google.maps.MapTypeId.ROADMAP | |
}), | |
marker = new google.maps.Marker({ |
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
<!doctype html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8" /> | |
<title>Parallax</title> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8/jquery.min.js"></script> | |
<script> | |
$(function(){ | |
var $scroll = ($.browser.mozilla || $.browser.msie) ? $('html') : $('body'), |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta http-equiv="content-type" content="text/html; charset=UTF-8"> | |
<title>CSS Flip</title> | |
<style type='text/css'> | |
/* entire container, keeps perspective */ | |
.flip-container { | |
-webkit-perspective: 1000; |
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
$('nav a').click(function(){ | |
target = $(this).attr('href'); | |
targetOffset = $(target).offset().top; | |
$('html,body').animate({ scrollTop: targetOffset }, 'slow'); | |
return false; | |
}); |
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
$('.elements') | |
.hide() | |
.each(function(index, element){ | |
var sleepTime = Math.floor(Math.random() * 2000), | |
t = setTimeout(function(){ | |
$(element).fadeTo(1000,1); | |
}, sleepTime); | |
}); |
OlderNewer