Skip to content

Instantly share code, notes, and snippets.

View gogromat's full-sized avatar

Alexander Astafurov gogromat

  • Brooklyn, New York
View GitHub Profile
@gogromat
gogromat / web-console.js
Created January 13, 2024 05:00
Download site images. Works with infinite scroll.
// Download images
// from webpage
// - works with infinite scrolls, etc.
// - choose between `fetch` and `canvas`
// - to disable CORS:
// - Firefox: `CORS Unblock` https://addons.mozilla.org/en-US/firefox/addon/cors-unblock/
let images = "img";
// Ex. Filter images that have `x-large` in them:
// images = "img[src*=xlarge]";
@gogromat
gogromat / disable-console.js
Created December 31, 2023 04:45
disable-suroiio-console
document.addEventListener("keydown", (e) => {
const code = Number.parseInt(e.keyCode, 10);
// console.log(`keyCode: ${code}`);
if (code === 192) {
e.preventDefault();
e.stopPropagation();
// console.log(`stopped ~`);
return false;
}
});
@gogromat
gogromat / keepy-bash
Last active November 18, 2023 01:35
Record bash command history `keepy`
# todo: sed this where `alias keepy=` or append to end of ~/.bashrc
cp keepy.sh ~/
chmod +x ~/.keepy.sh
# append to end of ~/.bashrc:
alias keepy="~/.keepy.sh ${@}"
@gogromat
gogromat / vscode-remove-extra-spaces.md
Last active October 17, 2023 15:22
VSCode - match/replace multiple spaces w/o newlines
@gogromat
gogromat / hide-taskbar.bat
Created July 21, 2023 01:09
Show/Hide taskbar in Windown
powershell -command "&{$p='HKCU:SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\StuckRects3';$v=(Get-ItemProperty -Path $p).Settings;$v[8]=3;&Set-ItemProperty -Path $p -Name Settings -Value $v;&Stop-Process -f -ProcessName explorer}"
@gogromat
gogromat / plex-svp-fix.bat
Last active August 13, 2023 01:13
Copies from SVP's mpv64 folder mpv-1.dll into Plex folder as mpv-2.dll
XCOPY D:\Software\SVP\mpv64\mpv-1.dll D:\Software\Plex\mpv-2.dll /Y
@gogromat
gogromat / polyfill.js
Last active October 21, 2021 20:25 — forked from nekman/polyfill.js
polyfill.io IE11 (3.108 - fixed Symbol/internalSymbol)
/* Polyfill service v3.108.0
* For detailed credits and licence information see https://github.com/financial-times/polyfill-service.
*
* Features requested: default
*
* - _DOMTokenList, License: ISC (required by "DOMTokenList", "default")
* - _ESAbstract.ArrayCreate, License: CC0 (required by "Array.of", "default")
* - _ESAbstract.Call, License: CC0 (required by "Object.assign", "Object.getOwnPropertyDescriptor", "_ESAbstract.ToPropertyKey", "_ESAbstract.ToPrimitive", "_ESAbstract.OrdinaryToPrimitive", "default")
* - _ESAbstract.CreateDataProperty, License: CC0 (required by "Array.from", "Set", "_ESAbstract.CreateIterResultObject", "default")
* - _ESAbstract.CreateDataPropertyOrThrow, License: CC0 (required by "Array.of", "default")
@gogromat
gogromat / .env
Last active October 21, 2021 20:35
env-cmd on bash on Linux with -x or --expand-envs
APP_ENV=development
@gogromat
gogromat / LARGE_HASHBYTES.sql
Last active January 13, 2021 21:26
Microsoft SQL. LARGE_HASHBYTES function works on VARBINARY data. For VARCHAR, use CONVERT function: dbo.LARGE_HASHBYTES('SHA1', CONVERT(VARBINARY(MAX), @varcharData)
CREATE OR ALTER FUNCTION dbo.LARGE_HASHBYTES (
@alg VARCHAR(10),
@St_val VARBINARY(MAX)
)
RETURNS VARBINARY(200)
AS
BEGIN
DECLARE @Int_Len AS INTEGER
SET @Int_Len = len(@St_val)
DECLARE @varBina_Val AS VARBINARY(MAX)
@gogromat
gogromat / ListEvents.md
Created May 17, 2020 05:22 — forked from cmbaughman/ListEvents.md
List all events on element with vanilla Javascript
  Element.prototype._addEventListener = Element.prototype.addEventListener;
  Element.prototype.addEventListener = function(a,b,c) {
    if(c==undefined)
      c=false;
    this._addEventListener(a,b,c);
    if(!this.eventListenerList)
      this.eventListenerList = {};
    if(!this.eventListenerList[a])