Skip to content

Instantly share code, notes, and snippets.

View WeslyG's full-sized avatar
🎯
Focusing

Vladimir Lila WeslyG

🎯
Focusing
  • Yandex.Cloud
  • Yekaterinburg
View GitHub Profile
mail.yandex.ru##.ns-view-left-box>:nth-of-type(2)
mail.yandex.ru##.mail-Layout-Content>:nth-of-type(2)
market.yandex.ru##[data-apiary-widget-name="@marketfront/HeaderPromo"]
market.yandex.ru##[data-apiary-widget-name="@marketfront/HeroBannerCarousel"]
market.yandex.ru##[data-apiary-widget-name="@marketfront/MadvHeaderPromo"]
youtube.com##[is-shorts]
docs.nestjs.com##div.banner
habr.com##.tm-stories-block
// for https://ui.gitlab-pages.kontur.host/docs/#/icons
const data = Array.from(document.querySelectorAll("[data-testid='mountNode']")[2].childNodes[2].children).filter(
i => i.localName === "div"
);
const result = [];
let idx = 0;
Array.from(data).forEach(a => {
Array.from(a.children[0].children).map(i => result.push([i.querySelector("p").innerText.replace(/[\u200b]/, "")]));
@WeslyG
WeslyG / touch.cmd
Created February 27, 2023 10:13
touch analog for windows
type nul >> %*
@WeslyG
WeslyG / cron_cleaner_job_k8s
Created February 16, 2023 16:00
cron job for clean local docker images
apiVersion: batch/v1
kind: CronJob
metadata:
name: cleaner
spec:
schedule: "0 8 * * *"
jobTemplate:
spec:
template:
spec:
@WeslyG
WeslyG / values.yaml
Last active February 16, 2023 19:02
Gitlab priveleged DID runner helm values
gitlabUrl : https://gitlab.com
runnerRegistrationToken: TOKEN
runners:
tags: "docker"
privileged: true
config: |
[[runners]]
[runners.kubernetes]
image = "ubuntu:20.04"
'use strict';
class Observable {
constructor(subscribe) {
this.observers = [];
if (subscribe) {
subscribe(this)
}
}
@WeslyG
WeslyG / js
Created November 20, 2022 11:15
Предпоследний тег в гите. The penultimate tag in the git
// creatordate нужен потому что в тегах созданных на ранних версиях гита вполне себе может не быть коммитера!
const gitLastTag = execSync(
`git for-each-ref --count=10 --sort=-creatordate --format='%(refname:short)' refs/tags/release/engine/v*`
);
const lastReleaseTags = gitLastTag
.toString()
.split("\n")
.map(i => i.replace(/'|"/g, ""))
.filter(i => i !== "")
This file has been truncated, but you can view the full file.
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
var _interopRequireDefault = _$$_REQUIRE(_dependencyMap[0]);
var _Main = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[1]));
var _SceneMain = _interopRequireDefault(_$$_REQUIRE(_dependencyMap[2]));
var _miot = _$$_REQUIRE(_dependencyMap[3]);
@WeslyG
WeslyG / gist:42348d88e79c1a5531c00fd0df6d527d
Created May 25, 2022 06:06
Курс доллара московская биржа home assistant
- name: Курс евро Московская биржа
platform: rest
resource: https://iss.moex.com/iss/engines/currency/markets/selt/boards/CETS/securities/EUR_RUB__TOM.json?iss.meta=off&marketdata.columns=LAST,VALUE&securities.columns=n
value_template: "{{ value_json.marketdata.data[0][0] }}"
unit_of_measurement: "rub"
scan_interval: 600
- name: Курс доллара Московская биржа
platform: rest
resource: https://iss.moex.com/iss/engines/currency/markets/selt/boards/CETS/securities/USD000UTSTOM.json?iss.meta=off&marketdata.columns=LAST,VALUE&securities.columns=n
value_template: "{{ value_json.marketdata.data[0][0] }}"
@WeslyG
WeslyG / gist:1e7c2c753f369e5294acf7e25b2073d2
Created April 5, 2022 06:46
powershell pre-commit hook with sh
#!/bin/sh
tscCommand="powershell.exe yarn tsc"
lintCommand="powershell.exe yarn lint"
echo "[HOOK] Running tsc..."
q=$(exec $tscCommand)
result=$?
if [ "$result" != "0" ]
then