Skip to content

Instantly share code, notes, and snippets.

View knorthfield's full-sized avatar

Kris Northfield knorthfield

View GitHub Profile
@knorthfield
knorthfield / numbers_explode.txt
Created May 31, 2016 09:54
Formulas for numbers to get first and last name from full name
LEFT(A2,FIND(" ",A2)−1)
RIGHT(A2,LEN(A2)−FIND(" ",A2))
@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 / 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 / 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(){

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 / 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
@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 / greensock-scroll-scrubber.html
Created October 21, 2013 12:33
Connect page scroll to Greensock animation scrubber
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script src="http://cdnjs.cloudflare.com/ajax/libs/gsap/latest/TweenMax.min.js"></script>
<script>
$(function(){
@knorthfield
knorthfield / gist:6682895
Created September 24, 2013 10:23
Generate htpasswd hash
htpasswd -nmb username password
@knorthfield
knorthfield / Cron Setup
Created August 6, 2013 09:26
Setting up Cron on OS X
1 Start up Terminal
2 Type "cd ~/" to go to your home folder
3 Type "touch .bash_profile" to create your new file.
4 Edit .bash_profile with your favorite editor (or you can just type "open -e .bash_profile" to open it in TextEdit.
5 Type ". .bash_profile" to reload .bash_profile and update any functions you add.
6 Add "export EDITOR=/usr/bin/nano" to make nano default editor
7 crontab -e
8 Add Follwing template:
# .---------------- minute (0 - 59)