- Check for an existing
.gitignorefile in the project directory
ls -a| use std::{ | |
| sync::{atomic::AtomicUsize, Arc}, | |
| time::Duration, | |
| }; | |
| use anyhow::{anyhow, Result}; | |
| use arc_swap::ArcSwap; | |
| use async_stream::stream; | |
| use futures::{Stream, StreamExt}; | |
| use lapin::{ |
| // Нужно открыть devtools в хроме или firefox, и скопировать туда полностью содержание файла | |
| // Вспомогательная пауза для 429 | |
| const pause = delay => new Promise(resolve => setTimeout(resolve, delay)); | |
| // Забираем список на кого мы подписаны из ручки | |
| const subscriptionReq = await fetch('https://rutube.ru/api/v1/subscription/cards/detail?limit=1000&offset=0', { credentials: 'include' }); | |
| const { results } = await subscriptionReq.json(); | |
| // Бежим подряд без параллелизма, рутуб всё равно ограничивает кол-во запросов с клиента, поэтому смысла ускорять нет, не даст быстрее |
| fn setup(mut commands: Commands) { | |
| let mut camera = OrthographicCameraBundle::new_2d(); | |
| camera.orthographic_projection.window_origin = WindowOrigin::BottomLeft; | |
| camera.orthographic_projection.scaling_mode = ScalingMode::WindowSize; | |
| commands.spawn(camera); | |
| } | |
| fn top_left_origin( | |
| windows: Res<Windows>, |
| // These hashes are for algorithmic use cases, such as bucketing in hashtables, where security isn't | |
| // needed and 32 or 64 bits is enough (that is, rare collisions are acceptable). These are way simpler | |
| // than sha1 (and all its deps) or similar, and with a short, clean (base 36 alphanumeric) result. | |
| // A simple, *insecure* 32-bit hash that's short, fast, and has no dependencies. | |
| // Output is always 7 characters. | |
| // Loosely based on the Java version; see | |
| // https://stackoverflow.com/questions/6122571/simple-non-secure-hash-function-for-javascript | |
| const simpleHash = str => { | |
| let hash = 0; |
| kubectl delete "$(kubectl api-resources --namespaced=true --verbs=delete -o name | tr "\n" "," | sed -e 's/,$//')" --all |
| https://ru.wikipedia.org/wiki/%D0%98%D0%BC%D1%8F_%D1%84%D0%B0%D0%B9%D0%BB%D0%B0 | |
| <pre> | |
| Запрещённые символы | |
| Многие операционные системы запрещают использование некоторых служебных символов. | |
| Запрещённые символы Windows (в различных версиях): | |
| \ — разделитель подкаталогов |