Skip to content

Instantly share code, notes, and snippets.

@noahzweben
noahzweben / order.ex
Created October 8, 2019 14:46
Label Ordering
%{"code" => "5:A1:1b", "encoded" => "POSITION:1384"},
%{"code" => "5:A1:1a", "encoded" => "POSITION:1385"},
%{"code" => "5:A2:1b", "encoded" => "POSITION:1704"},
%{"code" => "5:A2:1a", "encoded" => "POSITION:1705"},
%{"code" => "5:A3:1b", "encoded" => "POSITION:2024"},
%{"code" => "5:A3:1a", "encoded" => "POSITION:2025"},
%{"code" => "5:A1:2b", "encoded" => "POSITION:1382"},
%{"code" => "5:A1:2a", "encoded" => "POSITION:1383"},
%{"code" => "5:A2:2b", "encoded" => "POSITION:1702"},
@noahzweben
noahzweben / FrontEndChallenge.md
Last active July 31, 2018 15:53
<1 hr JavaScript Engineering Problem for Votem

Front End Engineering Problem

Write a function called makeSafeInterval(func,interval), which sets up an interval that executes func every interval seconds, stopping the first time func throws an error.

makeSafeInterval(func,interval) specs

  • makeSafeInterval(func,interval) should take a function and interval (in ms) as arguments
  • makeSafeInterval(func,interval) should return a function that can be called with additional arguments
  • makeSafeInterval should execute func every interval seconds. HOWEVER, the first time func throws an error, it should stop.