Skip to content

Instantly share code, notes, and snippets.

// ==UserScript==
// @name hide-comments-by-author.user.js
// @version 0.1
// @description Скрывает комменты выбранных авторов.
// @author shtrih
// @match https://smotret-anime.com/*
// @match https://anime365.ru/*
// @exclude https://smotret-anime.com/translations/embed/*
// @exclude https://anime365.ru/translations/embed/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=smotret-anime.com
QUERY PLAN
GroupAggregate (cost=16654.78..16654.84 rows=2 width=68) (actual time=627.317..627.339 rows=1 loops=1)
" Group Key: t.date_end, (CASE WHEN ((t.date_end < '2022-12-30'::date) AND ((t.status)::text = 'open'::text)) THEN 'expired'::character varying ELSE t.status END)"
-> Sort (cost=16654.78..16654.79 rows=2 width=44) (actual time=627.292..627.314 rows=1 loops=1)
" Sort Key: t.date_end, (CASE WHEN ((t.date_end < '2022-12-30'::date) AND ((t.status)::text = 'open'::text)) THEN 'expired'::character varying ELSE t.status END)"
Sort Method: quicksort Memory: 25kB
-> Subquery Scan on t (cost=16654.74..16654.77 rows=2 width=44) (actual time=627.273..627.295 rows=1 loops=1)
-> Sort (cost=16654.74..16654.74 rows=2 width=44) (actual time=627.271..627.292 rows=1 loops=1)
" Sort Key: ttt.date_end, ttt.status"
Sort Method: quicksort Memory: 25kB
@shtrih
shtrih / main.md
Last active October 21, 2022 03:00
Gorm.io preload by multiple foreign keys
type TimersTotal struct {
	UserID           string  `gorm:"column:user_id;" json:"-"`
	BookkeeperTeamID string  `gorm:"column:bookkeeper_team_id;" json:"-"`
	TeamID           *string `gorm:"column:team_id;" json:"-"`
	TaskID           *int64  `gorm:"column:task_id;" json:"-"`
	TypicalTaskID    *int64  `gorm:"column:typical_task_id;" json:"-"`
	TotalTimeSec     int64   `gorm:"column:total_time_sec;" json:"total_time_sec"`
// ==UserScript==
// @name auchan-prices.user.js
// @version 0.6
// @description Сортирует по выгоде и показывает цену за кг/л/шт! Нужно нажать ссылку слева снизу.
// @author You
// @match https://www.auchan.ru/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=auchan.ru
// @grant GM_addStyle
// @homepage https://gist.github.com/shtrih/ff9c87707ed34bab081d436de9256e03
// @supportURL https://gist.github.com/shtrih/ff9c87707ed34bab081d436de9256e03
#cs
Reads ChronoUp.txt content and send it's data to specified URL.
#ce
#AutoIt3Wrapper_AU3Check_Parameters=-d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6 -w 7
#pragma compile(Console, false)
#pragma compile(x64, true)
#pragma compile(Icon, "clock.ico")
#pragma compile(Out, "build/TimeSenderHPG3.exe")
#pragma compile(FileVersion, 1.1.1, 1.1.1)
@shtrih
shtrih / radio-switcher.cs
Last active February 17, 2021 09:08
GTA IV (steam version) ScriptHook .net Script. Drop it to "scripts" folder in game install folder. Press M to quick switch to IndependanceFM.
using System;
using System.Windows.Forms;
using GTA;
using GTA.@base;
public class InvincibilityScript: Script {
public InvincibilityScript() {
BindKey(Keys.M, new KeyPressDelegate(ToggleInvincibility));
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@shtrih
shtrih / tweetdeck-image-to-discord.user.js
Last active November 23, 2019 15:39
Post image from twitter (and tweetdeck!) to Discord (or Slack) channel in one click! Tested in Tampermonkey for Chrome. Fill out variables discordHookUri/slackHookUri to work! Moved to: https://github.com/shtrih/twitter-repost-image-to-discord
// ==UserScript==
// @name tweetdeck-image-to-discord.user.js
// @namespace http://tampermonkey.net/
// @version 0.2
// @description Repost Image to Discord (or to Slack) via Webhook in one click!
// @author shtrih
// @match https://tweetdeck.twitter.com/*
// @require https://code.jquery.com/jquery-3.3.1.min.js#sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=
// @grant GM_xmlhttpRequest
// @connect discordapp.com
@shtrih
shtrih / loop.sh
Created August 1, 2018 16:44
Bash loop command over arguments
#!/bin/sh
# usage: ./loop.sh "command name" arg1 arg2 2>&1 | tee loop.log
for i; do
if [ "$1" = "$i" ]; then
continue;
fi
echo "\n\n" $1 "$i";
VAR=$($1 "$i");
@shtrih
shtrih / donotasktoask_ru.md
Created February 14, 2018 02:02 — forked from ValdikSS/donotasktoask_ru.md
Спрашивайте сразу

Вам отправили это сообщение по следующим возможным причинам:

  • Вы поприветствовались и ждете ответа
  • Вы спросили о том, можно ли задать вопрос, и ждете ответа
  • Вы скинули запрос авторизации и ждете ответа

Пожалуйста, не делайте так. Задавайте вопрос сразу, без прелюдий, без запросов авторизации (в том числе и в Jabber), и ждите ответа. Не повторяйте свой вопрос и не спрашивайте, на месте ли я.

Здесь комментарии не пишите, уведомление о них не приходит ни мне, ни вам.

Если вам интересно получить развернутый ответ и аргументы, почему не стоить здороваться и ожидать ответа при общении онлайн: