Skip to content

Instantly share code, notes, and snippets.

View bsullins's full-sized avatar

Ben Sullins bsullins

View GitHub Profile
@bsullins
bsullins / mi-embedding.php
Last active August 29, 2015 14:26
Embedding Metric Insights PHP sample
<?php
define('BASE_URL','https://metrics.pluralsight.com');
define('APPLICATION_ID','...');
define('APPLICATION_KEY','...');
$ch = curl_init(BASE_URL.'api/get_ticket/');
curl_setopt($ch, CURLOPT_POSTFIELDS, array('application_id'=>APPLICATION_ID,
@bsullins
bsullins / metric-insights-wordpress-sso.php
Created August 11, 2015 03:01
Trusted Ticket Integration for Metric Insights and Wordpress that does not require php-json module
<?php
define('BASE_URL','metircs.mycompany.com');
define('APPLICATION_ID','...');
define('APPLICATION_KEY','...');
@bsullins
bsullins / .block
Last active April 12, 2016 17:12
first-blocks
license: gpl-3.0
@bsullins
bsullins / README.md
Created May 31, 2016 19:55
Game of Thrones Battle Map
@bsullins
bsullins / README.md
Last active May 31, 2016 21:44
Game of Thrones Battles in D3
@bsullins
bsullins / slide-o-matic.py
Last active June 21, 2016 18:42
Auto-create slides
from pptx import Presentation
courseName = 'D3 The Big Picture'
courseSlug = 'd3-big-picture'
data = {
"slides": [
{"module_num": 1, "slide_title": "What is D3", "slide_layout": 0, "slide_type": "title"},
{"module_num": 1, "slide_title": "D3 History", "slide_layout": 2, "slide_type": "normal"},
@bsullins
bsullins / README.md
Last active May 4, 2023 08:19
Simple Force Layout in D3
@bsullins
bsullins / hue-error.sql
Created October 12, 2016 16:33
I receive the error when trying to add a column to the list of the last select just before the count() aggregate
-- checkout client data
select *
from clients;
-- how many rows do we have?
-- 35,749
select count(1)
from sales_all_years
-- inner join from sales
@bsullins
bsullins / netlify-loggly-redirect.txt
Created September 5, 2017 18:59
How to use Loggly and Netlify to get around ad-blockers
# If using JS as a source for loggly and Netlify
# Follow instructions on loggly to tell it to use a proxy
# Then on Netlify include a file in _site with the following
# This will redirect all your loggly entries and get around adblockers
/loggly/* https://logs-01.loggly.com/:splat 200
@bsullins
bsullins / .block
Last active March 17, 2018 22:23
Tesla Affordability Calc
license: mit