View angular.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function() { | |
// /users/:user and then using /streams/:user | |
var twitchUsers = [ | |
'freecodecamp', 'goldglove', 'cohhcarnage', 'ellohime', 'siloz', 'xsmak', 'mushisgosu', 'medrybw' | |
]; | |
var twitchApp = angular.module('twitchApp', []); |
View gulpfile.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var gulp = require('gulp'), | |
sass = require('gulp-sass'), | |
uglify = require('gulp-uglify'), | |
concat = require('gulp-concat'); | |
var bowerPath = 'private/bower_components/'; | |
gulp.task('default', ['js-minify', 'js-minify:watch', 'sass', 'sass:watch', 'css']); | |
gulp.task('js', function() { |
View candy.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$resource = new Fractal\Resource\Collection($envData, function(EnviromentalData $env) { | |
return [ | |
'Data Recorded' => $env->data_recorded, | |
'Mean Temperature' => (new StatisticsDataset($env->air_temp))->getMean(), | |
'Median Temperature' => (new StatisticsDataset($env->air_temp))->getMedian(), | |
'Mean Pressure' => (new StatisticsDataset($env->bar_press))->getMean(), | |
'Median Pressure' => (new StatisticsDataset($env->bar_press))->getMedian(), | |
'Mean Speed' => (new StatisticsDataset($env->wind_speed))->getMean(), |
View DashboardController.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Http\Controllers; | |
use App\EnviromentalData; | |
use App\Datasets\StatisticsDataset; | |
use App\Services\TransformService; | |
use Illuminate\Http\Request; | |
use App\Http\Requests; |
View php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$years = array('2012', '2013', '2014', '2015'); | |
foreach($years as $year) | |
{ | |
$url = "http://lpo.dt.navy.mil/data/DM/Environmental_Data_Deep_Moor_{$year}.txt"; | |
$fp = fopen(base_path() . "/database/rawdata/{$year}.txt", 'w'); | |
$curl = curl_multi_init(); | |
curl_setopt_array($curl, array( | |
CURLOPT_URL => $url, | |
CURLOPT_FILE => $fp, |