Skip to content

Instantly share code, notes, and snippets.

View alexrintt's full-sized avatar

Alex alexrintt

View GitHub Profile
import os
CONFIG_FILE_NAME = 'l10n.yaml'
def find_config_file_path(top: str = os.path.dirname(__file__)) -> str | None:
for dirpath, dirnames, filenames in os.walk(topdown=True, top=top):
for filename in filenames:
if filename == CONFIG_FILE_NAME:
return os.path.join(dirpath, filename)
import { useState, useEffect, useCallback } from "react";
import {
COLOR_SCHEME_PREFERENCE_CHANGE_EVENT,
ColorSchemePreference,
THEME_CHANGE_EVENT,
ThemeKey,
getColorSchemePreference,
getCurrentTheme,
setColorSchemePreference,
} from "../theme";
@alexrintt
alexrintt / README.md
Last active May 22, 2023 17:46
Nodejs script to run exiftool recursively in a directory from the windows explorer right-click context menu.
@alexrintt
alexrintt / sample.dart
Created March 17, 2023 12:26
Why you should prefer getter for state objects in Flutter.
// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
@alexrintt
alexrintt / discord-timezones.js
Last active March 8, 2023 23:31
Tampermonkey extension that parses almost any text string in the specific format: TZ(+1) to UTC, so you can see what is the timezone of your friend living in mars,
// ==UserScript==
// @name Annotate Discord user timezones
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @match https://discord.com/*
// @icon https://icons.duckduckgo.com/ip3/discord.com.ico
// @grant none
// ==/UserScript==
@alexrintt
alexrintt / canvas-export.js
Last active March 5, 2023 16:03
Tampermonkey script to download any HTML canvas element as png.
// ==UserScript==
// @name Canvas Export
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author @alexrintt
// @match https://*/*
// @icon data:image/svg+xml,%3Csvg fill='none' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M11 4h2v12h2v2h-2v2h-2v-2H9v-2h2V4zM7 14v2h2v-2H7zm0 0v-2H5v2h2zm10 0v2h-2v-2h2zm0 0v-2h2v2h-2z' fill='%23808080'/%3E%3C/svg%3E
// @grant none
// ==/UserScript==
// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
@alexrintt
alexrintt / download-playstore-apk.md
Last active February 13, 2023 23:30
How to download PlayStore apks without PlayStore.

Disclaimer

The integrity of these apks is not guaranteed by PlayStore (neither I). It's up to you trust apkpure servers, do your checks before installing.


Send a GET request to this URL:

url = 'https://d.apkpure.com/b/APK/?version=latest'
const target = 200
const each = 10
const repetitions = Math.ceil(target / each)
const remainingHours = 8
const remainingMinutes = remainingHours * 60
const interval = Math.ceil(remainingMinutes / repetitions)
console.log(`${each} each ${interval} minutes`)
@alexrintt
alexrintt / install.md
Last active April 3, 2024 20:53
How to download WinDBG without Microsoft Store.

From microsoftfeedback/WinDbg-Feedback#19 (comment).

Here's how:

  • Go to: https://store.rg-adguard.net/.
  • Choose productId from the drop down, then input the store product id of WinDbg which is 9pgjgd53tn86.
  • Click on the tick button and give it a few seconds.
  • The website should display direct download links (check that links are pointing to Microsoft servers just to be sure).
  • Download the appx file (should be the last one on the list).
  • DO NOT try to install it by running the appx file, instead, just unzip it to a folder and voilà! your portable version of WinDbg is ready to be used.