Skip to content

Instantly share code, notes, and snippets.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@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)
// ==UserScript==
// @name auchan-prices.user.js
// @version 0.8
// @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
@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"`
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
// ==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/*