Skip to content

Instantly share code, notes, and snippets.

View met's full-sized avatar

Martin Hassman met

View GitHub Profile
@mormegil-cz
mormegil-cz / most_edited_articles_cswiki_2022.tsv
Created December 15, 2022 08:13
Nejeditovanější články na cswiki v roce 2022
Článek Editací
Ruská invaze na Ukrajinu (2022) 1674
Časová osa ruské invaze na Ukrajinu (2022) 731
Mistrovství světa ve fotbale 2022 483
Survivor Česko & Slovensko 352
Úmrtí v roce 2022 342
Seznam fotbalistů s 500 a více vstřelenými brankami 331
Tvoje tvář má známý hlas (9. řada) 325
2022 316
Seznam zájemců o kandidaturu ve volbě prezidenta České republiky 2023 311
@rauschma
rauschma / impatient-js-es2021.md
Last active August 31, 2023 07:02
ES2021 edition of “JavaScript for impatient programmers”

What is new in the ES2021 edition of “JavaScript for impatient programmers”?

Free to read online: exploringjs.com/impatient-js/

  • The exercises now run as native ESM modules on Node.js. Previously, they were run via the esm package.
  • Material on new ES2021 features:
    • String.prototype.replaceAll()
    • Promise.any()
    • Logical assignment operators
  • Underscores (_) as separators in number literals and bigint literals
@timvisee
timvisee / falsehoods-programming-time-list.md
Last active May 12, 2024 12:53
Falsehoods programmers believe about time, in a single list

Falsehoods programmers believe about time

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.

Falsehoods

  • There are always 24 hours in a day.
  • February is always 28 days long.
  • Any 24-hour period will always begin and end in the same day (or week, or month).
@dimapaloskin
dimapaloskin / Netflix.seek.js
Created October 18, 2017 18:32
Netflix seek
const videoPlayer = netflix
.appContext
.state
.playerApp
.getAPI()
.videoPlayer;
// Getting player id
const videoPlayer = videoPlayer
.getAllPlayerSessionIds()[0]

Upload images to GitHub

  1. Create a new issue on GitHub.

  2. Drag an image into the comment field.

  3. Wait for the upload process to finish.

  4. Copy the URL and use it in your Markdown files on GitHub.

@tomrus88
tomrus88 / gist:28fa1a4a25271e04616e
Last active August 2, 2023 01:35
WoW Lua Globals
_ERRORMESSAGE
AbandonQuest
AbandonSkill
AbbreviateLargeNumbers
AbbreviateNumbers
abs
AcceptAreaSpiritHeal
AcceptBattlefieldPort
AcceptDuel
AcceptGroup
@danbernier
danbernier / framework.js
Created November 4, 2015 19:27
A Tiny Framework for Automated Tests in Google Apps Script
function allTests(thisFnWrapsAllYourTests) {
var successes = 0;
var failures = [];
var scopes = [];
var msgInScope = function(msg) {
return scopes.concat([msg]).join(": ");
}
var doTheseListsMatch = function(expected, actual) {
@akora
akora / remove-diacritics-google-sheet
Created February 28, 2015 11:18
Removes all diacritics from strings (e.g. names) in a Google spreadsheet
=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")
@dannyid
dannyid / seek.js
Last active March 6, 2021 22:47
Netflix Seek
// 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);
@tylerneylon
tylerneylon / copy.lua
Last active April 10, 2024 02:29
How to deep copy Lua values.
-- 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