- Adding/removing indentation of large blocks creates huge diff-log, although that's simply spaces.
- Renaming a file doesn't come along with diff-log, it must be a separate commit, otherwise log is huge.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [ | |
| // 0, | |
| 1/2, | |
| 1/3,2/3, .33,.333,.3333,.66,.666,.6666, | |
| 1/4,3/4, | |
| 1/5,2/5,3/5,4/5, | |
| 1/6,5/6, | |
| 1/7, | |
| 1/8,3/8,5/8,7/8, | |
| 1/9, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (() => { | |
| // play around with initial sequences / operator combinations | |
| let seqs = {}, ops = {'+':(a,b)=>a+b,'-':(a,b)=>a-b}//'/':(a,b)=>a/b,'*':(a,b)=>a*b} | |
| const results = new Proxy({}, { | |
| set(results, prop, value){ | |
| if (results[prop]) { | |
| if (!results[prop].includes(value)) console.error('set', prop, ':', value, 'exists as', results[prop]) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // paste the code below into browser console in any youtube page and call `record(from, to)` | |
| // from and to are in seconds | |
| async function record(from, to) { | |
| var mediaElement=document.querySelector('video') | |
| var recordedChunks = []; | |
| var mimeType = 'audio/webm;codecs="opus"' | |
| var ac = new AudioContext(); | |
| var mediaSource = new MediaElementAudioSourceNode(ac, {mediaElement}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // try splitting buffer to N parts, recording in parallel, generating blob | |
| async function recordParallel() { | |
| const audioContext = new AudioContext(); | |
| const mimeType = 'audio/webm;codecs=opus' | |
| const bufs = [], all = [] | |
| for (let i = 0; i < 10; i++ ) { | |
| // 2705 - min chunk length for opus encoder in Chrome, so we increase block size to 4096 plus silent header |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| lookup diacritics { | |
| markClass [gravecomb acutecomb] <anchor 160 512> @TOP_MARKS; | |
| # ш м т | |
| pos base [\uni0448 \uni043C \uni0442] <anchor 500 512> mark @TOP_MARKS; | |
| } diacritics; | |
| feature mark { | |
| lookup diacritics; | |
| } mark; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <script> | |
| let hiddenNode = document.documentElement.appendChild(document.createElement('div')) | |
| hiddenNode.style.visibility = 'hidden' | |
| hiddenNode.style.height = 0 | |
| function calc(expression) { | |
| let cssExpression = expression | |
| // a + b → var(--a) + var(--b) | |
| .replace(/([a-z]\w*)(\b[^(]|$)/ig, 'var(--$1)$2') | |
| // -var(--a) → -1 * var(--a) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <script id='import-maps-polyfill'> | |
| const imports = {} | |
| // intercept all subsequent scripts before init | |
| ;(new MutationObserver(rx=>rx.forEach(({target:s}) => { | |
| if (s.tagName !== 'SCRIPT' || s.im) return | |
| if (s.getAttribute('type') === 'importmap') { | |
| Object.assign(imports, JSON.parse(s.textContent).imports) | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <script id='scoped-script'> | |
| let i = 0; | |
| (new MutationObserver(rx=>rx.forEach(({target:s}) => { | |
| if (s.tagName !== 'SCRIPT' || s.scoped || !s.hasAttribute('scoped')) return | |
| s.scoped=true | |
| if (!s.id) s.id='__s'+i++ | |
| s.innerHTML=`(function(){${s.innerHTML}}).call(document.getElementById('${s.id}').parentNode)` | |
| }))).observe(document, {childList:true,subtree:true,attributes:true,attributeFilter:['scoped']}) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "basics": { | |
| "name": "Dmitry Ivanov", | |
| "label": "Software Engineer", | |
| "image": "https://raw.githubusercontent.com/dy/resume/master/index.png", | |
| "email": "[email protected]", | |
| "phone": "+1 514 7755-376", | |
| "url": "", | |
| "summary": "Originally from Saint-Petersburg, earned Master's degree in Computer Graphics (CS) at Baltic State Technical University. Started his career as UI / Web designer collaborating at local startups, prominently kudago.com, with hobby passion for open-source. Afterwards moved to Montreal, Canada, where first collaborated with local businesses (TTBA, Amaze) as frontend / web engineer, then found an opportunity at Plotly Inc as WebGL specialist. Later switched to fintech at Mobeewave, that merged into Apple Wallet and Payments teams. Currently focused at audio / vis tech at elevenlabs.io and open-source projects.", | |
| "location": { |