Skip to content

Instantly share code, notes, and snippets.

View sashuk's full-sized avatar

Aleksandr Shumilov sashuk

View GitHub Profile
@sashuk
sashuk / index.md
Last active January 29, 2024 18:04
spread-operator-and-type-checks-in-typescript.md
@sashuk
sashuk / gist:410397686c987bb7a91eac6548d7f3c9
Last active August 8, 2023 09:45
Identify camelCase TS files
const fs = require('fs');
const path = require('path');
function isCamelCase(str) {
return /^[a-z][a-zA-Z0-9]*$/.test(str);
}
function findCamelCaseFilesRecursively(folderPath) {
fs.readdir(folderPath, (err, files) => {
if (err) {
@sashuk
sashuk / gist:d60297b86c203a2b68cf7b367495cc6f
Created August 3, 2023 16:40
happo-cypress take screenshot of entire full page
Screenshot is not cut off if <body/> in cypress/support/component-index.html has first child like
```
<div style="position: absolute; top: 0; bottom: 0; width: 100%; background-color: #FFF; z-index: -1000;"></div>
```
@sashuk
sashuk / index.sh
Created November 16, 2018 04:16
grunt uglify results in CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory
export NODE_OPTIONS=--max-old-space-size=4096