Skip to content

Instantly share code, notes, and snippets.

View keegandonley's full-sized avatar
:octocat:
building

Keegan Donley keegandonley

:octocat:
building
View GitHub Profile
@keegandonley
keegandonley / d3example.html
Last active August 29, 2015 14:27
D3 Stacked Column Example
<htmL>
<head>
<!-- load d3.js -->
<script src="http://d3js.org/d3.v2.js"></script>
</head>
<body>
<!-- div for stacked bar graph -->
<div id="canvas"></div>
@keegandonley
keegandonley / data.csv
Created August 11, 2015 20:54
D3 - Bar Chart Stacked Example
Month Conversions Action 2 Action 1 Installs Sign-ups Acquired
Jan 202070 343207 157204 264160 754420 727124
Feb 202070 343207 157204 264160 754420 727124
March 202070 343207 157204 264160 754420 2000000
April 202070 343207 157204 264160 754420 727124
May 202070 343207 157204 264160 754420 727124
June 202070 343207 157204 264160 754420 727124
July 202070 343207 157204 264160 754420 727124
August 202070 343207 157204 264160 754420 727124
@keegandonley
keegandonley / flare.json
Created August 11, 2015 20:55
D3 Bubble Chart Example
{
"name": "flare",
"children": [
{
"name": "analytics",
"children": [
{
"name": "cluster",
"children": [
{"name": "AgglomerativeCluster", "size": 3938},
@keegandonley
keegandonley / collapsable tree.html
Created August 11, 2015 20:56
D3 Circle Packing Example
<!DOCTYPE html>
<meta charset="utf-8">
<style>
.node rect {
cursor: pointer;
fill: #fff;
fill-opacity: .5;
stroke: #000099;
stroke-width: 1.5px;
@keegandonley
keegandonley / md5.js
Created August 11, 2015 21:51
JS md5 hash
var md5=(function(){function e(e,t){var o=e[0],u=e[1],a=e[2],f=e[3];o=n(o,u,a,f,t[0],7,-680876936);f=n(f,o,u,a,t[1],
12,-389564586);a=n(a,f,o,u,t[2],17,606105819);u=n(u,a,f,o,t[3],22,-1044525330);o=n(o,u,a,f,t[4],7,-176418897);f=n(f,o,u,a,t[5],
12,1200080426);a=n(a,f,o,u,t[6],17,-1473231341);u=n(u,a,f,o,t[7],22,-45705983);o=n(o,u,a,f,t[8],7,1770035416);f=n(f,o,u,a,t[9],
12,-1958414417);a=n(a,f,o,u,t[10],17,-42063);u=n(u,a,f,o,t[11],22,-1990404162);o=n(o,u,a,f,t[12],7,1804603682);f=n(f,o,u,a,t[13],
12,-40341101);a=n(a,f,o,u,t[14],17,-1502002290);u=n(u,a,f,o,t[15],22,1236535329);o=r(o,u,a,f,t[1],5,-165796510);f=r(f,o,u,a,t[6],
9,-1069501632);a=r(a,f,o,u,t[11],14,643717713);u=r(u,a,f,o,t[0],20,-373897302);o=r(o,u,a,f,t[5],5,-701558691);f=r(f,o,u,a,t[10],
9,38016083);a=r(a,f,o,u,t[15],14,-660478335);u=r(u,a,f,o,t[4],20,-405537848);o=r(o,u,a,f,t[9],5,568446438);f=r(f,o,u,a,t[14],
9,-1019803690);a=r(a,f,o,u,t[3],14,-187363961);u=r(u,a,f,o,t[8],20,1163531501);o=r(o,u,a,f,t[13],5,-1444681467);f=r(f,o,u,a,t[2],
9,-514
@keegandonley
keegandonley / README.md
Last active August 29, 2015 14:27 — forked from oodavid/README.md
Deploy your site with git

Deploy your site with git

This gist assumes:

  • you have a local git repo
  • with an online remote repository (github / bitbucket etc)
  • and a cloud server (Rackspace cloud / Amazon EC2 etc)
    • your (PHP) scripts are served from /var/www/html/
    • your webpages are executed by apache
  • apache's home directory is /var/www/
@keegandonley
keegandonley / comma_de-limit.js
Created August 11, 2015 22:55
Coma de-limit number value
function commaDelimit(number) {
return number.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
}
@keegandonley
keegandonley / getfiles.php
Created August 12, 2015 05:59
Return list of files in a directory
<?php
$images = array();
$dir = opendir('../img/easyPhotoGallery/');
while (($file = readdir($dir)) !== false)
{
if (substr($file,0,1) !== ".") { //Ignore system files
$images[] = $file;
}
@keegandonley
keegandonley / data.js
Last active August 29, 2015 14:27
Highcharts Funnel Data Format
series: [{
name: "sample data",
data: [
[name,count],
[name,count],
[name,count],
etc…
]
}]
@keegandonley
keegandonley / bobp-python.md
Created November 27, 2015 02:58 — forked from ksindi/bobp-python.md
A "Best of the Best Practices" (BOBP) guide to developing in Python.

The Best of the Best Practices (BOBP) Guide for Python

A "Best of the Best Practices" (BOBP) guide to developing in Python.

In General

Values

  • "Build tools for others that you want to be built for you." - Kenneth Reitz
  • "Simplicity is alway better than functionality." - Pieter Hintjens