Skip to content

Instantly share code, notes, and snippets.

View saaadel's full-sized avatar
😁
Weaknesses: not talkative. Strengths: not garrulous

Andrew Spoda saaadel

😁
Weaknesses: not talkative. Strengths: not garrulous
View GitHub Profile
@saaadel
saaadel / 1 steam_deck_notes.md
Created May 12, 2024 22:18 — forked from fsworld009/1 steam_deck_notes.md
Steam deck setup notes.md

Disk encryption

None. ValveSoftware/SteamOS#771 Be careful on what you are storing in this device (using browser and login to your accounts is NOT a good idea for now).

Barrier

Being able to control Steamdeck by using mouse and keyboard connected to PC/Laptop

@saaadel
saaadel / Delete_all_YouTube_comments.dev-tools.script.js
Last active May 15, 2024 03:53
How to delete all your comments on YouTube
// Open your Browser
// Go to https://myactivity.google.com/page?hl=en&page=youtube_comments
// Authorize if the site requires it.
// You should now see all your YouTube comments on the page
// Open your browser's Dev Tools (F12) or see the following instructions: https://developer.chrome.com/docs/devtools/open#last
// Select the "Console" tab in Dev Tools panel
// Copy & Paste the following code into the "Console" and press the "Enter" key
// === EDIT ===
// Note: This tab/window should be focused all time.

FACTORIO: LUA API: USEFUL ADMIN COMMANDS

SHOW YOUR OWN POSITION

/silent-command game.player.print( 'x: ' .. math.round( game.player.character.position.x ) .. ' y: ' .. math.round( game.player.character.position.y ) )

GOD MODE: FLY OVER THE MAP WITHOUT A BODY

@saaadel
saaadel / typeof-for-type.ts
Created June 3, 2021 19:52
TypeScript typeof for Type
export type TypeOfForType<T> =
T extends string ? 'string' :
T extends boolean ? 'boolean' :
T extends number ? 'number' :
T extends bigint ? 'bigint' :
T extends undefined ? 'undefined' :
T extends object ? 'object' :
T extends symbol ? 'symbol' : 'function';
@saaadel
saaadel / clear-yt-watch-later-playlist.js
Last active May 20, 2021 18:33
Clear a YouTube Watch Later playlist (it's a browser console script)
'Run it for URL: https://www.youtube.com/playlist?list=WL';
'Open the Browser console ([F12]), and insert code there. Push [Enter] key';
'Wait until the playlist become an empty, then it reloads the page (it clears all parts of the script from the memory)';
'If you have any issues - try to change the timeout values below'
const PL_CLEANING_ITEM_TIMEOUT = 250;
const PL_CLEANING_CONTEXT_MENU_TIMEOUT = 50;
const PL_CLEANING_DROP_SCRIPT_TIMEOUT = 10000;
@saaadel
saaadel / parallels-reset.sh
Created November 19, 2020 08:05 — forked from gdurastanti/parallels-reset.sh
Reset Parallels' trial
#!/bin/sh
# Reset Parallels Desktop's trial and generate a casual email address to register a new user
rm /private/var/root/Library/Preferences/com.parallels.desktop.plist /Library/Preferences/Parallels/licenses.xml
jot -w pdu%d@gmail.com -r 1
@saaadel
saaadel / latency.markdown
Last active January 7, 2020 06:07 — forked from hellerbarde/latency.markdown
Latency numbers every programmer should know

Latency Comparison Numbers (~2012 year)

Name Time (ns) Time (µs) Time (ms) Comment
L1 cache reference 0.5
Branch mispredict 5
L2 cache reference 7 14x L1 cache
Mutex lock/unlock 25
Main memory reference 100 20x L2 cache, 200x L1 cache
@saaadel
saaadel / silicon-valley-online.ru.user.js
Last active March 4, 2017 13:25
UserScript: (Anti-adblock Killer) Raw Video Player on site: silicon-valley-online.ru
// ==UserScript==
// @name silicon-valley-online.ru
// @namespace http://tampermonkey.net/
// @version 0.1
// @description (Anti-adblock Killer) Raw Video Player on site: silicon-valley-online.ru
// @author saaadel
// @match https://gist.github.com/search?l=javascript&q=%22user.js%22+%26%26+%22silicon-valley-online.ru%22
// @icon http://www.google.com/favicon.ico
// @include /^(http|https)?://silicon-valley-online.ru.*$/
// @grant none