Skip to content

Instantly share code, notes, and snippets.

(function() {
// This will need to change depending on the enviornment.
// Necessary data files should be included here. Don't
// forget the trailing slash.
var DATA_DIR = "/widgets/railroads_and_states/dist/data/";
// This key is kind of weird. It represents the United
// States in total within the data. Saving as a constant
// incase it's changed to something like "Nation", which
########################################
# File: /usr/bin/deploy
########################################
#!/bin/sh
REF_NAME=$1
DEPLOY_BRANCH=$2
REMOTE_PROJECT_PATH=$3
REMOTE_SERVER=$4
@psaia
psaia / crimes.php
Created June 7, 2014 01:34
crimes.php
<?php
error_reporting(E_ERROR | E_PARSE);
header('Content-Type: application/json');
class API {
const CACHE_FILE = "./addresses.txt";
private $hash = array();
public $crimes = array();
import React from 'react';
export default class Path extends React.Component {
constuctor(props) {
super(props);
this.state = {
d: props.d || props.initialD,
fill: props.fill || props.initialFill,
stroke: props.stroke || props.initialStroke,
className: props.className || props.initialClassName,
#!/usr/bin/env node
var fs = require('fs');
var path = require('path');
var async = require('async');
var glob = require('glob');
var slugify = require('slugify');
var parseCSV = require('csv-parse');
var rimraf = require('rimraf');
var d3 = require('d3');
/*
-------------------------------
Author: Pete Saia
File: inputHelper
Version: 2.0
http://petesaia.com/work/input-helper/
-------------------------------
*/
(function($) {
$.fn.inputHelper = function(settings) {
<?php
include(APPPATH.'libraries/facebook-client/facebook.php');
class Facebook_connect {
private $_obj;
private $_api_key = NULL;
private $_secret_key = NULL;
public $user = NULL;
<?php
$production_server = strpos($_SERVER["SERVER_NAME"], 'theProductionServer.com') !== false;
$staging_server = strpos($_SERVER["SERVER_NAME"], 'theStagingServer.com') !== false;
if ($staging_server)
{
}
elseif ($production_server)
{
<?php
// $Id$
/**
* Bill Tracker
* A drupal module for tracking bills using class.hfdrumbone.php
* @Author Pete Saia
* @version 1.0
*/
require_once drupal_get_path('module', 'bill_tracker').'/hfdrumbone.class.php';
/*
Site Name
Author
-----------------
Font Size Chart
-----------------
(Px) (%)
10 77
11 85