Skip to content

Instantly share code, notes, and snippets.

@milnak
milnak / garlic-os-tips.md
Last active May 5, 2024 08:50
My set of GarlicOS tips #rg35xx

Garlic OS Tips (Windows-based)

GarlicOS Cookbook

Follow these instructions for an easy way to get up and going quickly! These are complete instructions, and will be the easiest way to get started on a new RG35XX.

Set up SD Card

Get a high quality SD (e.g. SanDisk Extreme) card, 128GB or larger, 256GB is recommended. Don't skimp here, they're cheap, and don't use the card that comes with the RG35XX as it's crap.

@lord-alfred
lord-alfred / _README.md
Last active April 9, 2024 14:59
Y-Factors Formula

Y-Factors Formula

Здесь опубликованы коэффициенты для одного из внутренних ранжировщиков в поиске Яндекса. Это не итоговая формула, которая влияет на результат появления ссылки в серпе, т.к. судя по изученному коду – внутри используется несколько ранжировщиков и поисковых движков, результаты которых мержатся между собой и уже итоговый результат приводит к распределению ссылок по топу выдачи.

коэффициенты влияния на факторы

| Коэффициент | Название Фактора | Описание Фактора |

@matboehm
matboehm / DiscordGateway.mjs
Created April 10, 2022 16:08
Discord Gateway in JavaScript as EcmaScript module class; The DiscordGateway will connect to Discord Gateway servers, remain connected by sending hearbeats and reconnect on disconnect
/**
* Discord Gateway in JavaScript as EcmaScript module class
* based on https://gist.github.com/devsnek/4e094812a4798d8f10428d04ee02cab7
*
* The DiscordGateway will connect to Discord Gateway servers,
* remain connected by sending hearbeats and reconnect on disconnect
*/
import WebSocket from 'ws';
import zlib from 'zlib-sync';
@restyler
restyler / pcheck.sh
Last active February 16, 2024 21:06
CURL one-line proxy checker (shows connection speed, ip, and geo of proxy)
#!/bin/bash
# download, do chmod +x and copy to /usr/bin/local via ln -s /downloaded-dir/pcheck.sh /usr/local/bin/pcheck
# then launch as: pcheck http://user:pw@proxy-addr:port (to view ip and geo via lumtest.com website)
# or pcheck http://user:pw@proxy-addr:port https://www.google.com/ (to download specific website)
curl -w @- -sS -H "user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.75 Safari/537.36" --proxy "$1" ${2:-"https://lumtest.com/myip.json"} <<'EOF'
\n
time_namelookup: %{time_namelookup}\n
time_connect: %{time_connect}\n
@prescience-data
prescience-data / scroll-to-element.ts
Created March 8, 2022 23:14
Puppeteer Scroll To Element
import { randomInt } from "node:crypto"
import type Puppeteer from "puppeteer-core"
/** Recast Puppeteer private properties **/
type Page = Omit<Puppeteer.Page, "_client"> & {
readonly _client: Puppeteer.CDPSession
}
type ElementHandle = Omit<Puppeteer.ElementHandle, "_page"> & {
@prescience-data
prescience-data / download-chrome.ts
Created December 8, 2021 00:20
Download most recent Chrome build
import { createWriteStream, ensureDir } from "fs-extra"
import got from "got"
import { Stream } from "stream"
export type Platform =
| "Win_x64"
| "Win"
| "Mac"
| "Mac_Arm"
| "Linux_x64"
@xrip
xrip / asyncHttps.ts
Last active April 8, 2022 11:06
Async Nodejs https request wrapper
import { RequestOptions, get as httpsGet, request as httpsRequest } from 'https';
import { IncomingMessage } from 'http';
const makeCallback = (resolve: (data: string | unknown) => void, reject: (e: Error) => void, json = false) => (response: IncomingMessage): void => {
let buffer = '';
response.on('data', chunk => buffer += chunk);
response.on('end', () => {
try {
@SamuelScheit
SamuelScheit / discordWebpackModules.js
Last active November 10, 2022 06:33
Discord Webpack Modules
const protect = (theModule) => {
if (theModule.remove && theModule.set && theModule.clear && theModule.get && !theModule.sort)
return null;
if (!theModule.getToken && !theModule.getEmail && !theModule.showToken) return theModule;
const proxy = new Proxy(theModule, {
getOwnPropertyDescriptor: function (obj, prop) {
if (prop === "getToken" || prop === "getEmail" || prop === "showToken") return undefined;
return Object.getOwnPropertyDescriptor(obj, prop);
},
get: function (obj, func) {
@berstend
berstend / hcaptcha.ts
Created April 15, 2021 13:56 — forked from prescience-data/hcaptcha.ts
HCaptcha Solver
import { IncomingMessage, RequestListener, ServerResponse } from "http"
import { createServer, Server } from "https"
import puppeteer, {
Browser,
BrowserLaunchArgumentOptions,
Protocol
} from "puppeteer-core"
import { Page } from "./types"
import Cookie = Protocol.Network.Cookie
@scresante
scresante / Youtube_Livestream_Parts_download.py
Last active December 3, 2021 12:08 — forked from cheadrian/Youtube_Livestream_Parts_download.py
Download Youtube Live streamed video from the start or selected time
#With the help of this script you can download parts from the Youtube Video that is live streamed, from start of the stream till the end
import urllib.request
try:
from tqdm import tqdm
except ImportError:
print('consider installing tqdm for a nice progress bar')
#E.G: "https://r4---sn-gqn-p5ns.googlevideo.com/videoplayback?expire=1603041842& ..... 2.20201016.02.00&sq="
#The sound link should contain: &mime=audio in it.