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
document.addEventListener("DOMContentLoaded", function () { | |
// create a new hydra-synth instance | |
const canvas = document.getElementById("myCanvas"); | |
canvas.width = window.innerWidth; | |
canvas.height = window.innerHeight; | |
new window.Hydra({ | |
canvas: canvas, | |
detectAudio: false, | |
}); | |
const button = document.getElementById("myButton"); |
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
s0.initScreen(); | |
src(s0) | |
.rotate([Math.PI / 4, Math.PI / 2, (Math.PI * 3) / 4, Math.PI].fast(0.5)) | |
.repeat(4) | |
.scale([1, 1.5].fast(0.1)) | |
.thresh(0.4, 0.4) | |
.colorama(({ time }) => Math.sin(time / 20)) | |
.saturate([1, 0.9, 0.8, 0.7].fast(0.2)) |
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
function handleRequest(request) { | |
const firstSegment = getFirstSegmentOfPath(request); | |
const destinationApp = config.apps.find((app) => firstSegment === app.path); | |
if (destinationApp) { | |
proxyRequestToDomain(destinationApp.domain); | |
return; | |
} | |
proxyRequestToApp(config.defaultDomain); | |
} |
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 Html exposing (..) | |
import Html.Attributes exposing (..) | |
import Html.Events exposing (..) | |
import Html.Keyed as Keyed | |
-- MODEL | |
type alias Model = | |
{ entries : List Entry | |
, uid : Int | |
, newTodoText : String |
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 Karcero.Engine.Contracts; | |
using Karcero.Engine.Models; | |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
namespace Karcero.Visualizer | |
{ |
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
# http:#eslint.org/docs/rules/ | |
ecmaFeatures: | |
binaryLiterals: false # enable binary literals | |
blockBindings: false # enable let and const (aka block bindings) | |
defaultParams: false # enable default function parameters | |
forOf: false # enable for-of loops | |
generators: false # enable generators | |
objectLiteralComputedProperties: false # enable computed object literal property names | |
objectLiteralDuplicateProperties: false # enable duplicate object literal properties in strict mode | |
objectLiteralShorthandMethods: false # enable object literal shorthand methods |
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
{"message":"testCollectionStarting","flowId":"ef88d720e40b440e9ef79461eaea4e91","assembly":"test.xunit.runner.reporters, Version=99.99.99.0, Culture=neutral, PublicKeyToken=null","collectionName":"Test collection for TeamCityReporterMessageHandlerTests+OnMessage_ITestStarting","collectionId":"151794a8-0e29-4e6d-a464-d215967eeb22"} | |
{"message":"testCollectionStarting","flowId":"d372efdc4f0c4dbf85dd3ad91ad07638","assembly":"test.xunit.runner.reporters, Version=99.99.99.0, Culture=neutral, PublicKeyToken=null","collectionName":"Test collection for TeamCityReporterMessageHandlerTests+OnMessage_ITestCollectionStarting","collectionId":"ca68584f-b31f-4ef4-a61a-9802a1a2f966"} | |
{"message":"testCollectionStarting","flowId":"a9c9647c2cca435abe99cc33ea503639","assembly":"test.xunit.runner.reporters, Version=99.99.99.0, Culture=neutral, PublicKeyToken=null","collectionName":"Test collection for TeamCityReporterMessageHandlerTests+OnMessage_ITestSkipped","collectionId":"55fa344e-cee5-4198-a6bd-204342559bb4"} | |
{"message":"test |
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
public class RandomUserFetcher | |
{ | |
public async Task<RandomUser> Fetch() | |
{ | |
using (var webClient = new WebClient()) | |
{ | |
var result = await webClient.DownloadStringTaskAsync("http://api.randomuser.me"); | |
dynamic obj = JsonConvert.DeserializeObject(result); | |
var userStr = obj.results[0].user.ToString(); | |
var user = JsonConvert.DeserializeObject<RandomUser>(userStr); |
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
[Test] | |
public void ParallelMapGenerationTest() | |
{ | |
const int SIZE = 1000; | |
const int NUMBER_OF_ROOMS = 320; | |
const int NUMBER_OF_PARALLEL_CALLS = 16; | |
var generator = new DungeonGenerator<Cell>(); | |
DateTime start = DateTime.Now; | |
//One big map | |
for (var i = 0; i < ITERATIONS; i++) |
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
// http://paulirish.com/2011/requestanimationframe-for-smart-animating/ | |
// http://my.opera.com/emoller/blog/2011/12/20/requestanimationframe-for-smart-er-animating | |
// requestAnimationFrame polyfill by Erik Möller. fixes from Paul Irish and Tino Zijdel | |
// MIT license | |
(function() { | |
var lastTime = 0; | |
var vendors = ['ms', 'moz', 'webkit', 'o']; |