Skip to content

Instantly share code, notes, and snippets.

Oded Welgreen odedw

Block or report user

Report or block odedw

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
odedw / first-pass.ts
Last active Jan 3, 2020
Reverse Proxy
View first-pass.ts
function handleRequest(request) {
const firstSegment = getFirstSegmentOfPath(request);
const destinationApp = config.apps.find((app) => firstSegment === app.path);
if (destinationApp) {
odedw / Todo.elm
Created Aug 27, 2017
Todo app in Elm
View Todo.elm
import Html exposing (..)
import Html.Attributes exposing (..)
import Html.Events exposing (..)
import Html.Keyed as Keyed
type alias Model =
{ entries : List Entry
, uid : Int
, newTodoText : String
odedw / CorridorCleaner.cs
Last active Mar 11, 2017
Map Processor for Karcero to remove corridors with less than X cells
View CorridorCleaner.cs
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
odedw / .eslintrc.yaml
Last active Aug 13, 2018 — forked from cletusw/.eslintrc
ESLint Reset - A starter .eslintrc file that resets all rules to off and includes a description of what each rule does. From here, enable the rules that you care about by changing the 0 to a 1 or 2. 1 means warning (will not affect exit code) and 2 means error (will affect exit code).
View .eslintrc.yaml
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
odedw / gist:01cdda96f1ae5143406f
Created Oct 27, 2015
xUnit JSON reporter test output example
View gist:01cdda96f1ae5143406f
{"message":"testCollectionStarting","flowId":"ef88d720e40b440e9ef79461eaea4e91","assembly":"test.xunit.runner.reporters, Version=, 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=, 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=, Culture=neutral, PublicKeyToken=null","collectionName":"Test collection for TeamCityReporterMessageHandlerTests+OnMessage_ITestSkipped","collectionId":"55fa344e-cee5-4198-a6bd-204342559bb4"}
odedw / RandomUserFetcher
Created Jan 12, 2015
Fetch a random user from
View RandomUserFetcher
public class RandomUserFetcher
public async Task<RandomUser> Fetch()
using (var webClient = new WebClient())
var result = await webClient.DownloadStringTaskAsync("");
dynamic obj = JsonConvert.DeserializeObject(result);
var userStr = obj.results[0].user.ToString();
var user = JsonConvert.DeserializeObject<RandomUser>(userStr);
odedw / gist:d6a3f493c01de4f10264
Created Sep 12, 2014
Parallel Map Generation
View gist:d6a3f493c01de4f10264
public void ParallelMapGenerationTest()
const int SIZE = 1000;
const int NUMBER_OF_ROOMS = 320;
var generator = new DungeonGenerator<Cell>();
DateTime start = DateTime.Now;
//One big map
for (var i = 0; i < ITERATIONS; i++)
odedw / rafTicker.js
Created May 30, 2014
Lightweight ticker based on requestAnimationFrame using Paul Irish's polyfill.
View rafTicker.js
// 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'];
You can’t perform that action at this time.