Skip to content

Instantly share code, notes, and snippets.

View thibaultboursier's full-sized avatar
💻

Thibault thibaultboursier

💻
View GitHub Profile
<?xml version="1.0" encoding="UTF-8"?>
<VAST xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="vast.xsd"
version="4.0">
<Ad id="5926628810">
<InLine>
<AdSystem>GDFP</AdSystem>
<AdTitle>External - Single Inline Linear Skippable</AdTitle>
<Description><![CDATA[External - Single Inline Linear Skippable ad]]></Description>
<Error><![CDATA[https://pubads.g.doubleclick.net/pagead/interaction/?ai=B7rGWN-POZq6iIs-mkdUPwumGuAGf4LWVRgAAABABII64hW84AViV8drBgwRg-_n8gogKsgEEbnVsbLoBCjcyOHg5MF94bWzIAQXaAQxodHRwOi8vbnVsbC_AAgLgAgDqAi4vMjE3NzU3NDQ5MjMvZXh0ZXJuYWwvc2luZ2xlX3ByZXJvbGxfc2tpcHBhYmxl-AKD0h6AAwGQA8gGmAPgA6gDAeAEAdIFBhDK24SKFpAGAaAGI6gHuL6xAqgHmgaoB_PRG6gHltgbqAeqm7ECqAeDrbECqAfgvbECqAf_nrECqAffn7ECqAf4wrECqAf7wrEC2AcB4AcB0ggxCIChgBAQARgdMgWqgIDCGjoRh9CDgICAhAjQioSAgJyu4AFIvf3BOljp3rnUpZeIA9gIAoAKBZgLAaoNAkZS0BUB-BYBgBcB&sigh=1qzBOhf4qSE&label=videoplayfailed[ERRORCODE]]]></Error>
<Impression><![CDATA[http
https://stackblitz.com/edit/typescript-taopb3?file=stories%2Findex.ts
Good resource : https://codepen.io/philipp-spiess/pen/WpQpGr
https://codesandbox.io/s/wml6yXZ2z
https://github.com/konvajs/react-konva/issues/118
@thibaultboursier
thibaultboursier / gist:509bddde6df39142a1febd16f20f8a98
Created July 5, 2017 15:37
Sort object collection by property's value
arr.reduce((previous, current, index) => {
var obj = previous;
var currentValue = current.label.charCodeAt(0);
if (obj.lastValue && obj.lastValue > currentValue) {
obj.sort.splice(index - 1, 0, current);
} else {
obj.sort.push(current);
}
/^[a-z0-9._]+@[a-z0-9._]+\.[a-z]{2,6}$/.test("foo@bar.com");
[{
"name": "Pierre",
"age": 46
}, {
"name": "Laurent",
"age": 18
}, {
"name": "Stéphanie",
"age": "57"
}]