This file contains hidden or 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Self Explaining Code Sample</title> | |
<!-- Google Fonts --> | |
<link rel="stylesheet" href="//fonts.googleapis.com/css?family=Roboto:300,300italic,700,700italic"> | |
<!-- CSS Reset --> | |
<link rel="stylesheet" href="//cdn.rawgit.com/necolas/normalize.css/master/normalize.css"> |
This file contains hidden or 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
from flask import Flask, Response | |
import json, datetime | |
app = Flask(__name__) | |
@app.route("/") | |
def hello(): | |
versionFile = open('versionInfo.txt', 'r') | |
version = int(versionFile.read()) | |
data = { |
This file contains hidden or 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 timer = stopwatch(); | |
timer = timer.start(); | |
setTimeout(function(){ | |
timer = timer.stop(); | |
console.log(timer.getElapsed().getMilliseconds()); | |
}, 1500); |
This file contains hidden or 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 loadData = function(){ | |
var getDataTimer = stopwatch(); | |
getDataTimer.start(); | |
$http.get('/getMyData') | |
.success(function(data, status, headers, config) { | |
getDataTimer.stop(); | |
console.log('Get data time in ms ', getDataTimer.getElapsed()) | |
This file contains hidden or 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
#load "Sculpt.fs" | |
open Sculpt.Experimentation | |
open System | |
let toSlug (filename:string) = | |
let replace (old:string) (n:string) (statement:string) = | |
statement.Replace(old, n) | |
let singleSpace (statement:string) = | |
System.Text.RegularExpressions.Regex.Replace(statement, @"[\s]+", " ") |
This file contains hidden or 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
using System; | |
using System.Collections.Generic; | |
namespace ContiguousItems | |
{ | |
public static class LinqContiguousExtensions | |
{ | |
public static IEnumerable<T> SkipUntil<T>(this IEnumerable<T> source, Predicate<T> predicate) | |
{ |
This file contains hidden or 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
using System.IO; | |
using System.Text; | |
using System.Xml; | |
namespace XMLMinifier | |
{ | |
/// <summary> | |
/// Config object for the XML minifier. | |
/// </summary> | |
public class XMLMinifierSettings |