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
# Change * or port 80 as needed | |
<VirtualHost *:80> | |
DocumentRoot "path\to-nowhere" | |
ServerName your-server-name-here # Sample: mywebsite.com | |
<Directory "path\to-nowhere"> | |
Options Indexes FollowSymLinks Includes ExecCGI | |
AllowOverride All | |
Require all granted | |
</Directory> |
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 ctx = document.getElementById("graph").getContext("2d"); | |
var data = { | |
labels: ["2011", "2012", "2013"], | |
datasets: [ | |
{ | |
label: "Trainer Score", | |
fillColor: "rgba(220,220,220,0.2)", | |
strokeColor: "rgba(220,220,220,1)", | |
pointColor: "rgba(220,220,220,1)", | |
pointStrokeColor: "#fff", |
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
// Includes functions for exporting active sheet or all sheets as JSON object (also Python object syntax compatible). | |
// Tweak the makePrettyJSON_ function to customize what kind of JSON to export. | |
var FORMAT_ONELINE = 'One-line'; | |
var FORMAT_MULTILINE = 'Multi-line'; | |
var FORMAT_PRETTY = 'Pretty'; | |
var LANGUAGE_JS = 'JavaScript'; | |
var LANGUAGE_PYTHON = 'Python'; |
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 doGet(request) { | |
var output = ContentService.createTextOutput(); | |
var data = {}; | |
var id = request.parameters.id; | |
var sheet = request.parameters.sheet; | |
var ss = SpreadsheetApp.openById(id); | |
if (sheet) { | |
data[sheet] = readData_(ss, sheet); | |
} else { | |
// Grab all sheets except those with a name |
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
'use strict'; | |
(function(window){ | |
/** | |
* Function: Keydown | |
* | |
* Manipulate keypress actions. | |
* | |
* Parameters: |
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
'use strict'; | |
(function(window) { | |
// | |
// Manipulate Mouse Wheel | |
// source: http://www.adomas.org/javascript-mouse-wheel/index.html | |
// | |
/** | |
* Function: MouseWheelEvent |
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
$scope.link = function($elementRoot, element){ | |
$elementRoot.append($compile(element)($scope)); | |
$scope.$digest($elementRoot); | |
}; | |
ListLessonsCtrl.link($scrollPane.find('.jspPane'), | |
'<div class="btn-lesson {{lesson.buttonColor}}" ng-repeat="lesson in lessons[\'' + day.id + '\'] track by $index|orderBy:lesson.created_at" ' + | |
'ng-init="lessonIdx = $index">' + | |
'<a class="btn btn-default" ng-click="showLessonSummary($index, \'' + day.id + '\')" onclick="preventExpand = true">' + | |
'{{lesson.name}} <div class="stud-ratio gone">| {{lesson.studTaken}} / {{lesson.studCount}}</div>' + |
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
/** | |
* Angular App Factory: LocalStorage | |
*/ | |
(function() { | |
'use strict'; | |
angular.module('app.factories') | |
.factory('LocalStorage', LocalStorage); |
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 DecimalToRoman(num) { | |
if (num <= 0 || num >= 4000) return num; | |
var roman = ["M","CM","D","CD","C","XC","L","XL","X","IX","V","IV","I"]; | |
var decimal = [1000,900,500,400,100,90,50,40,10,9,5,4,1]; | |
var romanStr = ''; | |
for (var i = 0, limit = roman.length; i < limit; ++i) { | |
while (num >= decimal[i]) { |