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
/** | |
* GET /mini-profiler-includes returns a <script> element | |
* Re-create it in the DOM and append it to the document. | |
* | |
* Using ES5 for maximum compatibilty. | |
*/ | |
(function (window) { | |
if ("MiniProfiler" in window) return console.warn("MiniProfiler already imported."); | |
var ERROR_MESSAGE = "MiniProfiler could not be loaded: "; |
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
namespace Redux { | |
export interface Action<TType extends string, TPayload> { | |
type: TType; | |
payload: TPayload; | |
} | |
export interface Thunk<TAction, TResult> { | |
(dispatch: Dispatch<TAction>, getState: () => any): TResult; | |
} |
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
/* | |
* <style> injection browser plugin | |
*/ | |
// NB hot reloading support here | |
function cssInject(style, css) { | |
if (style) { | |
style.innerHTML = css; | |
} else { | |
style = document.createElement('style'); |
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
{ | |
"results":{ | |
"opensearch:Query":{ | |
"#text":"", | |
"role":"request", | |
"startPage":"1" | |
}, | |
"opensearch:totalResults":"0", | |
"opensearch:startIndex":"0", | |
"opensearch:itemsPerPage":"30", |
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
import React from 'react'; | |
import { createRedux } from 'redux'; | |
import { provide } from 'redux/react'; | |
import { Router } from 'react-router'; | |
import { history } from 'react-router/lib/HashHistory'; | |
import routes from './routes'; | |
const redux = createRedux({}); | |
@provide(redux) |
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
import inspect, operator | |
import urllib | |
import re | |
import logging | |
import webapp2 | |
import json | |
from google.appengine.ext import db | |
from google.appengine.api import users | |
from google.appengine.ext.webapp.util import run_wsgi_app |
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 $compileCache = function ($http, $templateCache, $compile) { | |
var cache = {}; | |
return function (src, scope, cloneAttachFn) { | |
var compileFn = cache[src]; | |
if (compileFn) { | |
compileFn(scope, cloneAttachFn); | |
} else { | |
$http.get(src, { cache: $templateCache }).success(function (response) { | |
var responseContents = angular.element('<div></div>').html(response).contents(); |
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; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
using Irony.Parsing; | |
namespace SolLewitt.Parser | |
{ | |
[Language("SolLewittDrawing", "0.1", "Sol Lewitt style drawing description language")] |
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
angular.module('ui.bootstrap.typeahead.alt', ['ui.bootstrap.position']) | |
/** | |
* A helper service that can parse typeahead's syntax (string provided by users) | |
* Extracted to a separate service for ease of unit testing | |
*/ | |
.factory('typeaheadParser', ['$parse', function ($parse) { | |
var TYPEAHEAD_REGEXP = /^\s*(.*?)(?:\s+as\s+(.*?))?(?:\s+grouped\s+as\s+\((.*?\s+in\s+.*?)\))?\s+for\s+(?:([\$\w][\$\w\d]*))\s+in\s+(.*)$/; | |
var TYPEAHEAD_GROUP_REGEGXP = /^\s*(?:([\$\w][\$\w\d]*))\s+in\s+(.*)$/; |