Skip to content

Instantly share code, notes, and snippets.

View knorthfield's full-sized avatar

Kris Northfield knorthfield

View GitHub Profile
@knorthfield
knorthfield / live_filter.js
Created April 11, 2012 22:23
jQuery live filter
$("#filter").focus();
$("#filter").keyup(function(){
strFilter = $("#filter").val().toLowerCase();
$("ul.projects li").each(function(){
$(this).html().toLowerCase().match( strFilter ) ?
$(this).fadeIn() :
$(this).fadeOut() ;
});
});
@knorthfield
knorthfield / latest_business_status.php
Last active October 2, 2015 11:27
Get latest Facebook status for business page
<?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(
@knorthfield
knorthfield / latest_tweet.php
Created March 29, 2012 10:53
Use PHP to get latest tweet for user
<?php
$twitter = json_decode(
file_get_contents(
'http://twitter.com/users/show/smythsonsdeli.json',
false,
stream_context_create(
array(
'http' => array('ignore_errors' => true)
)
)