Skip to content

Instantly share code, notes, and snippets.

View knorthfield's full-sized avatar

Kris Northfield knorthfield

View GitHub Profile
@knorthfield
knorthfield / keywords.txt
Last active August 29, 2015 14:02
2inspire Keyword Reasearch
leadership management
management and leadership
leadership styles (management styles, laissez faire leadership, democratic leadership, leadership style, types of leadership, styles of leadership, leadership and management styles, different types of leadership, different styles of leadership, charismatic leaders, leadership approaches, leadership types, leadership strategies, management and leadership styles, what is leadership style, lean leadership, types of leader, leadership styles in business, effective leadership styles, leadership styles in management, understanding leadership styles, 6 styles of leadership, different approaches to management and leadership, different styles of leadership and management, leadership management styles, three leadership styles, what are the different leadership styles, management style theories, leadership style theories, team leadership styles, leadership methods, types of leadership skills, what are the leadership styles, what leadership styles are there, model of leade
@knorthfield
knorthfield / ffsx-apis
Created July 11, 2014 14:22
FFSX APIs
http://fantasy.premierleague.com/web/api/elements/691/
http://nbviewer.ipython.org/urls/dl.dropboxusercontent.com/u/8169386/FantasyLeague/GettingFantasyFootballData.ipynb

Keybase proof

I hereby claim:

  • I am knorthfield on github.
  • I am knorthfield (https://keybase.io/knorthfield) on keybase.
  • I have a public key whose fingerprint is E7D2 47A1 A60A 2D9C 6204 F0EF 6817 A706 995E FFDD

To claim this, I am signing this object:

@knorthfield
knorthfield / scroll-fix.js
Last active August 29, 2015 14:13
Fix element when scrolled offscreen
$(function(){
var unfix_distance = $('nav#menu').offset().top,
$fixed_element = $('nav#menu');
window.onresize = function() {
unfix_distance = $('nav#menu').offset().top;
}
$(window).scroll(function(){
@knorthfield
knorthfield / gist:e9c0519a113f4ef4304f
Last active August 29, 2015 14:18
Remove an HTML element
var clear = document.getElementById('clear'),
overlay = document.getElementById('overlay');
clear.addEventListener('click', function(){
overlay.parentNode.removeChild(overlay);
})
@knorthfield
knorthfield / post_to_csv.php
Last active August 29, 2015 14:23
Add $_POST values to CSV
<?php
if( $_SERVER['REQUEST_METHOD'] == 'post' ){
$fp = fopen('../registrations.csv', 'a');
fputcsv($fp, $_POST);
fclose($fp);
}
?>
@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)
)
)
@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 / deploy.sh
Created April 11, 2012 22:25
rsync deployment
rsync -arvuz --delete --include .htaccess --exclude .git --exclude .gitignore --exclude deploy ~/beta.example.com/ ~/example.com/