Skip to content

Instantly share code, notes, and snippets.

View kyleparisi's full-sized avatar

Kyle Parisi kyleparisi

  • Newtown, PA
View GitHub Profile
@kyleparisi
kyleparisi / xml-to-tsv.php
Last active November 14, 2016 13:29
This php script takes a local xml file input and stdouts the equivalent tsv.
<?php
/**
* This php script takes a local xml file input and stdouts the equivalent csv.
*/
$shortopts = "";
$shortopts .= "f:"; // Required value
$options = getopt($shortopts);
if (count($options) === 0) {
@kyleparisi
kyleparisi / Drag.js
Last active January 2, 2019 13:21
A single script to handle dragging of html or svg elements
try {
if (document) {
}
} catch (e) {
throw new Error("Drag module only works in browsers");
}
const Drag = function(view) {
let documentation = `
# Usage
<html>
<head>
</head>
<body>
</body>
</html>
@kyleparisi
kyleparisi / Kyle's Data Science.md
Last active August 30, 2016 16:39
Self exploration of data science

Kyle's Data Science

tl;dr: don't setup locally, skip to Q/A...

Setup spark on local (with ipython)

gist

brew install apache-spark
* { box-sizing:border-box; }
/* form starting stylings ------------------------------- */
.group {
position:relative;
margin-top:2em;
}
input {
font-size:18px;
padding:10px 10px 10px 5px;
@kyleparisi
kyleparisi / valid.js
Created July 25, 2016 21:06
All values are true in js object
// If all inputs are valid return true
let allValid = Object.keys(state).reduce((prev, curr) => (prev && state[curr].valid) ? true : false, true);
@kyleparisi
kyleparisi / button.css
Created July 22, 2016 17:58
Pure css material button click
.btn {
position: absolute;
top: 50%;
left: 50%;
transform: translate3d(-50%, -50%, 0);
padding: 1em 2em;
background-color: #3498db;
border-radius: 3px;
color: #fff;
font-family: 'Roboto', sans-serif;
@kyleparisi
kyleparisi / osx_install.sh
Last active July 7, 2021 05:27 — forked from t-io/osx_install.sh
Install most of my Apps with homebrew & cask
#!/bin/sh
echo Install all AppStore Apps at first!
# no solution to automate AppStore installs
# Update: there is a way now, just haven't updated yet
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew install mas
read -p "Press any key to continue... " -n1 -s
echo
mas install 1176895641 # Spark
@kyleparisi
kyleparisi / Vagrantfile
Last active August 31, 2015 20:41 — forked from borgand/Vagrantfile
Generic multi-machine Vagrantfile that supports fast and easy way to get testing machines up and running. Provisioning is done through multi-tier shell scripting
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Landrush domain name suffix
# https://github.com/phinze/landrush
# For linux:
# sudo apt-get install -y resolvconf dnsmasq
# sudo sh -c 'echo "server=/vm/127.0.0.1#10053" > /etc/dnsmasq.d/vagrant-landrush'
# sudo service dnsmasq restart
#
["10th Street","13th Street South","15th Street","16th Street","18th Street","19th Street","23rd St","2nd Avenue","2nd Street","2nd Street West","36th Street","37th Street Walk","38th Parallel Place","3rd Avenue","3rd Street","3rd Street East","420","45th Street","48th Street","4th Avenue","4th St","4th Street","4th Street East","55 Terrace","59th Street","5th Avenue","5th Street","5th Street Pedestrian Tunnel","6th Avenue","6th Street","6th Street East","7th Avenue","7th Street","7th Street West","8th Avenue","8th Street","8th Street West","9th Street","","Abigail Street","Adams Avenue","Addison Street","Admiral Peary Way","Admiral Wilson Boulevard","Adrian Way","Afton Road","Agate Street","Alabama Road","Albatross Road","Albert Street","Albright Street","Alder Place","Alfred Avenue","Alfred Drive","Allen Drive","Allman Street","Almond Court","Almond Street","Alter Street","Amber Street","America Road","Amon Avenue","Ancona Street","Andover Road","Angelo Place","Angora Avenue","Angora Terrace","Annin Street"