Skip to content

Instantly share code, notes, and snippets.

View FreePhoenix888's full-sized avatar
Empty your mind, be formless, shapeless - like water

FreePhoenix888

Empty your mind, be formless, shapeless - like water
View GitHub Profile
@FreePhoenix888
FreePhoenix888 / sourceforge-files-get-sorted-name-and-downloads
Created March 2, 2025 07:13
Sourceforge Files - Get sorted name and downloads from
let data = [];
document.querySelectorAll("#files_list tbody tr").forEach(row => {
let name = row.querySelector("th .name")?.innerText.trim();
let downloadsText = row.querySelector(".stats .count")?.innerText.trim();
if (name && downloadsText) {
let downloads = parseInt(downloadsText.replace(/,/g, ""), 10); // Remove commas & convert to number
data.push({ name, downloads });
}
@FreePhoenix888
FreePhoenix888 / exportWatcherData.js
Last active December 12, 2024 08:22
Export watcher data
// Open the watcher website and execute this command in the browser console
const allData = []
const dayColumns = document.querySelectorAll(`.day`)
for (const dayColumn of dayColumns) {
const date = dayColumn.querySelector(`.day-header__date`)
const loggedTimes = dayColumn.querySelectorAll(`.logged-time`)
for (const loggedTime of loggedTimes) {
const subtitle = loggedTime.querySelector(`.logged-time-header__subtitle`).children[0]
const time = loggedTime.querySelector(`.logged-time-header__time`)
@FreePhoenix888
FreePhoenix888 / smartphone_rom_installation_instruction.md
Last active September 12, 2024 09:15
Smartphone ROM installation instruction

Clean Flash

Warning: your data will be removed so backup it to other storage, for example your computer Warning: read the whole instruction before doing anything, especially if you do this for the first time

Unlock bootloader

I have unlocked my bootloader a lot of time ago, so I am not really able to write guide for it right now :) Google it

Install Custom Recovery (TWRP)

  • Reboot to bootloader: Use any of these methods:
    • Use this command on your computer: adb reboot bootloader
  • Press Power+Volume Down (can be different for different devices)
@FreePhoenix888
FreePhoenix888 / find_and_cat.sh
Last active July 19, 2024 11:25
Find and cat bash
find . -type f ! -path '*/.*' -exec sh -c 'printf "\n"; echo {}:; cat {}' \; > output.txt
function serialize(numbers) {
return numbers.map(num => String.fromCharCode(num)).join('');
}
function deserialize(str) {
return str.split('').map(char => char.charCodeAt(0));
}
let numbers = [1, 5, 10, 255, 300];
let serialized = serialize(numbers);
@FreePhoenix888
FreePhoenix888 / yargs-boilerplate.ts
Last active February 26, 2024 07:51
Yargs Boilerplate
import yargs from "yargs";
import { hideBin } from "yargs/helpers";
const cliOptions = yargs(hideBin(process.argv))
.usage(`$0 [Options]`, `Description of the program`)
.options({
verbose: {
alias: "v",
description: "Enable verbose logging",
type: "boolean",
@FreePhoenix888
FreePhoenix888 / findGetCommunityPointsButtonAndClickWithInterval.js
Last active February 26, 2024 07:42
Find "Get Community Points" button and click with interval
findGetCommunityPointsButtonAndClickWithInterval();
/**
* Finds the get community points button
*/
function findGetCommunityPointsButton() {
const communityPointsContainerElement = document.body.querySelector(
".community-points-summary"
);
console.log({ communityPointsContainerElement });
@FreePhoenix888
FreePhoenix888 / find_repeating_chat_messages_and_alarm.js
Last active February 25, 2024 16:09
Find Repeating Chat Messages And Alarm
doAllWork();
/**
* Find repeating messages in the twitch chat every {@link checkIntervalInMs} milliseconds and play a sound at url {@link soundUrl} if there are more than {@link howManyMessagesMustBeUnique} unique messages in the last {@link howManyMessagesToCheck} and logs the messages if {@link shouldLog} is true and adds a stop button to the page
* @example
* ```
* workForMe()
* ```
*/
function doAllWork(
@FreePhoenix888
FreePhoenix888 / Описание Дипа.md
Last active November 15, 2023 06:27
Описание дипа

Краткое описание

Deep это:

  • Связи
  • Пакеты, содержащие связи (сам пакет это тоже связь)
  • Обработчики вставки/обновления/удаления в любой поддерживаемой среде
  • Материализованный путь связей, деревья

Связи

@FreePhoenix888
FreePhoenix888 / gist:442a7b0735dcbc8a1cb689642d5070f1
Last active August 24, 2023 07:21
create...Decorator prototype talking

Код-прототип для декоратора пакета capacitor-geolocation

import {DeepClientInstance} from '@deep-foundation/deeplinks/imports/client.js'
import { Package } from './package';

/**
 * 
 * @example
 * #### Create a decorator from another decorator
\`\`\`