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
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
-- MODEL
type alias Model =
{ entries : List Entry
, uid : Int
, newTodoText : String
@odedw
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
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
# 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
@odedw
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=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
@odedw
odedw / RandomUserFetcher
Created Jan 12, 2015
Fetch a random user from randomuser.me
View RandomUserFetcher
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);
@odedw
odedw / gist:d6a3f493c01de4f10264
Created Sep 12, 2014
Parallel Map Generation
View gist:d6a3f493c01de4f10264
[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++)
@odedw
odedw / rafTicker.js
Created May 30, 2014
Lightweight ticker based on requestAnimationFrame using Paul Irish's polyfill.
View rafTicker.js
// 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'];
You can’t perform that action at this time.