Skip to content

Instantly share code, notes, and snippets.

View grgaortiz's full-sized avatar

George Ortiz grgaortiz

View GitHub Profile
@grgaortiz
grgaortiz / angelListStartupsToCSV.js
Last active August 25, 2015 20:24
A simple node.js script to pull Utah startups from AngelList into CSV file.
// Load required packages
var fs = require('fs');
var csv = require('csv');
var async = require('async');
var angel = require('angellist');
var json2csv = require('json2csv');
// Set this to your AngelList params for your registered application
var clientID = '';
var clientSecret = '';
@grgaortiz
grgaortiz / index.js
Created September 10, 2015 14:27
AngelList NPM package updates
var config = require('./config'),
request = require('request'),
urlHelper = require('./util/url_helper');
function init(clientID, secret) {
config.clientID = clientID;
config.secret = secret;
}
function setAccessToken(token) {
/**
* Libraries
*/
// Default
var request = require('request');
var fs = require('fs');
var async = require('async');
// CSV
SELECT current AS Agency,
(count(current)/37*100) AS Percent
FROM UtahAgencyEmployees
WHERE latest_education_major = 'Graphic Design'
GROUP BY current
ORDER BY Percent DESC
LIMIT 20
SELECT skill,
count(*) as count
FROM EmployeeSkills
WHERE skill != ''
GROUP BY skill
ORDER BY Count DESC
Limit 20
SELECT latest_education_major AS Major,
count(latest_education_major) AS Employees
FROM UtahAgencyEmployees
WHERE latest_education_major != ''
GROUP BY latest_education_major
ORDER BY Employees DESC
LIMIT 20
SELECT education AS School,
count(education) AS Employees
FROM UtahAgencyEmployees
WHERE education != ''
GROUP BY education
ORDER BY Employees DESC
LIMIT 20
SELECT current,
avg(monthsTenure) as monthsTenure
FROM UtahAgencyEmployees
WHERE current != '' AND monthsTenure < 73
GROUP BY current
HAVING count(*) > 2
ORDER BY monthsTenure DESC
LIMIT 20
<?php
setcookie('sptfrUser', 'eqc\gortiz');
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>API Scenario</title>
# Docker file to build a CentOS LAMP Stack
# (CentOS and Apache latest versions, PHP 5.6.16, mssql, freetds and wktmltopdf)
FROM centos:latest
MAINTAINER Marco Ramos <mramos29@sapo.pt>
# Environment Variables
# Install essential packages