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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"/> | |
<title>const predicate inside vs outside method scope</title> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/benchmark/1.0.0/benchmark.min.js"></script> | |
<script src="./suite.js"></script> | |
</head> | |
<body> | |
<h1>Open the console to view the results</h1> |
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 si2sf = require('svgicons2svgfont'); | |
var svg2ttf = require('svg2ttf'); | |
var fs = require('fs'); | |
function toUnicode(theString) { | |
var unicodeString = ''; | |
for (var i=0; i < theString.length; i++) { | |
var theUnicode = theString.charCodeAt(i).toString(16).toUpperCase(); | |
while (theUnicode.length < 4) { | |
theUnicode = '0' + theUnicode; |
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
<!doctype html> | |
<html lang="en" ng-app> | |
<head> | |
<title>Primus WS Reconnect Example</title> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<link rel="stylesheet" href="/css/bootstrap.min.css"> | |
<link rel="stylesheet" href="/css/bootstrap-responsive.min.css"> | |
<style> | |
body { | |
padding-top: 60px; |
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
/* server.js */ | |
// | |
// # SimpleServer | |
// | |
// A simple chat server using Socket.IO, Express, and Async. | |
// | |
var http = require('http'); | |
var path = require('path'); |
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
/* | |
While trying to figure out how to get typeahead to allow multiple suggestions/matches per textbox, | |
I found bassjobsen's awesome Bootstrap-3-Typeahead repo - https://github.com/bassjobsen/Bootstrap-3-Typeahead. | |
I was able to use that to accomplish what I wanted. I wasn't able to get it working with the latest typeahead.js. | |
It will let you continue typing after the first suggestion, and append future suggestions into the textbox. | |
*/ |
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 ($) { | |
var lists = {}; | |
function filterList($list) { | |
var shouldShow = function ($item) { | |
var filters = lists[$item.id]; | |
for (var filter in filters) { | |
var className = filters[filter]; |
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
<rewrite> | |
<!-- Have a bunch of redirects? Put them in a separate file --> | |
<rules configSource="Rewrites.config" /> | |
<rules> | |
<!-- Simple rewrite --> | |
<rule name="Simple rewrite" stopProcessing="true"> | |
<match url="^path/sub path/page\.aspx$" /> | |
<action type="Rewrite" url="/newpath.aspx" /> |
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
// html.ajax-loading { cursor: wait; } | |
define(['jquery'], function ($) { | |
$(function () { | |
var $html = $('html'); | |
var $document = $(document); | |
var cssClass = 'ajax-loading'; | |
var requests = 0; | |
function setBusy() { |
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
public static IEnumerable<T> OrderBy<T>(this IEnumerable<T> items, string sortExpression) | |
{ | |
IEnumerable<T> sortedItems = items; | |
Action<string> orderBy = delegate(string orderByExpression) { | |
string[] temp = orderByExpression.Split(' '); | |
string property = String.Empty; | |
string direction = String.Empty; | |
if (temp.Length > 0) |
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
using System; | |
using Microsoft.WindowsAPICodePack.Shell; | |
namespace System.Windows | |
{ | |
public class AutomaticGlassWindow : GlassWindow | |
{ | |
public AutomaticGlassWindow() { | |
this.AeroGlassCompositionChanged += new EventHandler<AeroGlassCompositionChangedEventArgs>(AutomaticGlassWindow_AeroGlassCompositionChanged); | |
} |