Skip to content

Instantly share code, notes, and snippets.

// ==UserScript==
// @name auchan-prices.user.js
// @version 0.9
// @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
// ==UserScript==
// @name hide-comments-by-author-anime365.user.js
// @version 0.3
// @description Скрывает комменты выбранных авторов на anime365.ru.
// @author shtrih
// @license MIT
// @match https://anime365.ru/*
// @match https://anime-365.ru/*
// @match https://hentai365.ru/*
// @match https://smotret-anime.com/*
@shtrih
shtrih / danbooru_tags_getter.user.js
Last active March 25, 2023 20:12
On the post pages under search field appears as a link "🏷️ Tags". When clicked, will open the block with the reference image and a list of tags. На странице поста, под полем поиска появляется ссылка "🏷️ Tags", при нажатии на которую, откроется блок со ссылкой на изображение и списком тегов.
// ==UserScript==
// @name Danbooru tags getter
// @namespace https://gist.github.com/shtrih/5413585/
// @version 0.3
// @description On the post pages under search field appears as a link "🏷️ Tags". When clicked, will open the block with the reference image and a list of tags. На странице поста, под полем поиска появляется ссылка "🏷️ Tags", при нажатии на которую, откроется блок со ссылкой на изображение и списком тегов.
// @match https://danbooru.donmai.us/posts/*
// @match https://aibooru.online/posts/*
// @copyright 2013+, shtrih
// ==/UserScript==
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"`
@shtrih
shtrih / CollapsibleEmbeds.plugin.js
Last active August 22, 2021 08:55
[Outdated] Plugin for BetterDiscord. Creates caret to hide image/video previews.
//META{"name":"CollapsibleEmbeds"}*//
/*
Check for Updates: https://gist.github.com/shtrih/59a8be1f9ff53f0499c2
How to install:
1. If you don't have it, get Discord from https://discordapp.com/apps
2. Download BetterDiscord for your platform on https://betterdiscord.net/home
3. Push the button «Raw» then Ctrl + S.
3. Place the plugin in %appdata%\BetterDiscord\plugins\.
4. Refresh Discord with Ctrl + Shift + R or just restart Discord completely.
5. Go to the BetterDiscord settings → plugins tab and check plugin.
@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));
#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 / Csv.php
Last active February 19, 2020 20:59
<?php
/**
* Created by PhpStorm.
* User: shtrih
* Date: 24.09.2017
* Time: 21:57
*/
namespace App\Util;
@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