Skip to content

Instantly share code, notes, and snippets.

View jrsconfitto's full-sized avatar

James Sconfitto jrsconfitto

View GitHub Profile
@jrsconfitto
jrsconfitto / index.html
Last active August 29, 2015 13:57
7 Wonders blocks base
<!DOCTYPE html>
<meta charset="utf-8">
<body>
<script src="http://d3js.org/d3.v3.min.js"></script>
<script type="text/javascript" src="tabletop.js"></script>
<script>
document.addEventListener('DOMContentLoaded', function() {
var gData
// https://docs.google.com/spreadsheets/d/1Whyq_IPIWrm7L6qTeu4IuSQ2RWnwtfwWiVwhA-jGEtQ/pubhtml
var key = 'https://docs.google.com/spreadsheet/pub?key=0AmhWglGO45rldFBiek84a1FHRmhPQjZaVzRSRGJZbXc&output=html'
@jrsconfitto
jrsconfitto / .gitignore
Last active August 29, 2015 13:58
7 Wonders base block
node_modules
@jrsconfitto
jrsconfitto / README.md
Last active August 29, 2015 13:58 — forked from mbostock/.block
7 Wonder's score streamgraphs
@jrsconfitto
jrsconfitto / index.html
Last active August 29, 2015 13:58 — forked from mbostock/.block
7 Wonders scores stacked bar graph
<!DOCTYPE html>
<html>
<title>7 Wonders scores as stacked bars</title>
<style type="text/css">
svg {
width: 960px;
height: 500px;
border: solid 1px #ccc;
font: 10px sans-serif;
@jrsconfitto
jrsconfitto / index.html
Last active August 29, 2015 13:59
7 Wonders streamgraph
<!DOCTYPE html>
<meta charset="utf-8">
<title>7 Wonders Streamgraph</title>
<style>
body {
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
margin: auto;
position: relative;
width: 960px;
}
@jrsconfitto
jrsconfitto / alphabetizelines.rb
Created June 9, 2011 15:18
Alphabetizes the words in a file and then prints them line by line. There will be a line for each first character in each word.
#! ruby
# This script will take the words in a file or passed argument and alphabetize them. Then they will be put out with a line for each starting letter.
# This will help me with grabbing all the keywords and organzing them alphabetically by line so that in the future adding keywords to the Edict language spec will be easier since they are in an alphabetical list.
if ARGV.size == 1
lines = []
input = ""
output = ""
@jrsconfitto
jrsconfitto / chop.rb
Created June 13, 2011 22:09
Code Kata Two solutions
class Chop
def chop(target, values)
size = values.size
if size == 0
-1
elsif size == 1
(values[0] == target ? 0 : -1)
else
if target < values[size/2]
@jrsconfitto
jrsconfitto / RandomNumberSet.rb
Created September 26, 2011 13:57
This will generate random data that is timestamped in a CSV
#! ruby
# This will generate a negative number set that i can use for testing my compression analysis
#
# Example:
# NegNumSet numberOfPoints [max] [freq]
#
# Arguments (all are optional so far):
# 1: numberOfPoints - the number of points to generate
# 2: Max - the maximum distance from zero that the data point values can have
@jrsconfitto
jrsconfitto / GetUniqueOPCMethods.rb
Created November 14, 2011 21:47
Grab the unique OPC methods from an exported OPC Analyzer trace
#! ruby
#
# Gets the unique OPC methods from the OPC analyzer trace log of all the methods TopView Configurator and Engine uses
# Assumes that it has been given a valid file name
if ARGV.length == 1 and File.exists?(ARGV[0])
input = File.open(ARGV.first, "r").read
# Build up a unique array of OPC methods
opc_methods = []
@jrsconfitto
jrsconfitto / programmingAF.md
Created January 23, 2012 14:18
Programming PI AF

Programming PI AF

Just a few things that i'm learning

Event Frame Reference:

  • Built into the AF SDK.
  • Uses packages:
    • OSIsoft.AF.UI
  • OSIsoft.AFSDK