I wouldn't be so alone
If my Github followers lived in my home
Alex Russell would send a pull request
But I'd be too busy
Return to San Francisco by nine
/** | |
tree.js - nice ascii-art DOM trees | |
usage: tree(element[, options]); | |
example: | |
var s = tree(document.body,{ | |
serialize: function(element){...}, // return a string representation such as "div#foo.bar" | |
filter: function(element){...} // return false for any nodes to not include in tree | |
}); | |
console.log(s); | |
*/ |
I wouldn't be so alone
If my Github followers lived in my home
Alex Russell would send a pull request
But I'd be too busy
Return to San Francisco by nine
-- copy.lua | |
-- | |
-- Lua functions of varying complexity to deep copy tables. | |
-- | |
-- 1. The Problem. | |
-- | |
-- Here's an example to see why deep copies are useful. Let's | |
-- say function f receives a table parameter t, and it wants to |
// The player | |
var player = netflix.cadmium.objects.videoPlayer(); | |
// Metadata about current episode -- ID and url to get frame at a specific time | |
var episodeId = netflix.cadmium.metadata.getActiveVideo().episodeId; | |
var imgRoot = netflix.cadmium.metadata.getActiveVideo().progressImageRoot; | |
// Generates URL of preview image for given timestamp | |
function getFrame(timestamp) { | |
var t = Math.floor(timestamp/10000).toString(10); |
=SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(C2,"ö","o"),"ü","u"),"ó","o"),"ő","o"),"ú","u"),"é","e"),"á","a"),"ű","u"),"í","i"),"Ö","O"),"Ü","U"),"Ó","O"),"Ő","O"),"Ú","U"),"É","E"),"Á","A"),"Ű","U"),"Í","I") |
function allTests(thisFnWrapsAllYourTests) { | |
var successes = 0; | |
var failures = []; | |
var scopes = []; | |
var msgInScope = function(msg) { | |
return scopes.concat([msg]).join(": "); | |
} | |
var doTheseListsMatch = function(expected, actual) { |
_ERRORMESSAGE | |
AbandonQuest | |
AbandonSkill | |
AbbreviateLargeNumbers | |
AbbreviateNumbers | |
abs | |
AcceptAreaSpiritHeal | |
AcceptBattlefieldPort | |
AcceptDuel | |
AcceptGroup |
const videoPlayer = netflix | |
.appContext | |
.state | |
.playerApp | |
.getAPI() | |
.videoPlayer; | |
// Getting player id | |
const videoPlayer = videoPlayer | |
.getAllPlayerSessionIds()[0] |
This is a compiled list of falsehoods programmers tend to believe about working with time.
Don't re-invent a date time library yourself. If you think you understand everything about time, you're probably doing it wrong.