Skip to content

Instantly share code, notes, and snippets.

View gonchik's full-sized avatar
🎯
Focusing

Gonchik Tsymzhitov gonchik

🎯
Focusing
View GitHub Profile
@gonchik
gonchik / .bat
Last active September 22, 2023 20:32
enable gpedit.msc
@echo off
pushd "%~dp0"
dir /b %SystemRoot%\servicing\Packages\Microsoft-Windows-GroupPolicy-ClientExtensions-Package~3*.mum >List.txt
dir /b %SystemRoot%\servicing\Packages\Microsoft-Windows-GroupPolicy-ClientTools-Package~3*.mum >>List.txt
for /f %%i in ('findstr /i . List.txt 2^>nul') do dism /online /norestart /add-package:"%SystemRoot%\servicing\Packages\%%i"
pause
@gonchik
gonchik / tableau_views_stats.sql
Last active July 26, 2023 08:31
Tableau - Get stats of usage views, boards
/*
Statistics of usage views, boards in Tableau
Also, you can find data in the /var/opt/tableau/tableau_server/data/tabsvc/logs/vizqlserver/vizqlserver_node*.log
*/
SELECT views_stats.user_id AS users_id,
system_users.name AS system_users_name,
users.login_at AS users_login_at,
system_users.friendly_name AS system_users_friendly_name,
views_stats.view_id AS views_id,
@gonchik
gonchik / tc.sh
Created May 10, 2023 09:26
Traffic control script
#!/bin/bash
#
# ## installation
# dnf install iproute-tc
# yum install iperf3 # for testing
# tc uses the following units when passed as a parameter.
# kbps: Kilobytes per second
# mbps: Megabytes per second
# kbit: Kilobits per second
# mbit: Megabits per second
/*
Metabase. Stats
Most viewed questions in the last 3 months
*/
SELECT rc.name AS CardName , COUNT(vl.user_id) AS viewCount
FROM view_log vl
INNER JOIN report_card rc ON rc.id = vl.model_id
@gonchik
gonchik / gist:46b7ff6ba7ffc49fdb5d73376e6e5b0f
Created January 16, 2022 17:51
just yet another nginx.conf from test env
events {
worker_connections 1024;
multi_accept on;
}
http {
proxy_buffering on;
proxy_cache_path /var/cache/nginx levels=1:2 keys_zone=jira_static:20m inactive=60m use_temp_path=off;
proxy_cache_valid any 8h;
sendfile on;
@gonchik
gonchik / cleanup.sh
Last active November 30, 2023 13:15
Clean the Linux files
#!/bin/bash -eux
# Function to detect the operating system
get_os() {
if [[ -e /etc/debian_version ]]; then
echo "debian"
elif [[ -e /etc/redhat-release ]]; then
echo "redhat"
else
echo "unsupported"
@gonchik
gonchik / setPreviousDateOfResolution.groovy
Last active March 5, 2021 17:19
changeHistory.groovy
/* This script works without notification and history and as a service */
import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.issue.CustomFieldManager
import com.atlassian.jira.issue.fields.CustomField
import com.atlassian.jira.issue.IssueManager
import com.atlassian.jira.issue.Issue
import com.atlassian.jira.issue.MutableIssue
import org.apache.log4j.Logger
import org.apache.log4j.Level
@gonchik
gonchik / gist:1efdcff188130abbd1fd9281600cb90e
Created January 22, 2021 15:07
clean_windows_temp_files.bat
erase "%TEMP%\*.*" /f /s /q
for /D %%i in ("%TEMP%\*") do RD /S /Q "%%i"
erase "%TMP%\*.*" /f /s /q
for /D %%i in ("%TMP%\*") do RD /S /Q "%%i"
erase "%ALLUSERSPROFILE%\TEMP\*.*" /f /s /q
for /D %%i in ("%ALLUSERSPROFILE%\TEMP\*") do RD /S /Q "%%i"
erase "%SystemRoot%\TEMP\*.*" /f /s /q
@gonchik
gonchik / collapsible.html
Created December 3, 2020 20:30
collapsible email
<!doctype html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office">
<head>
<title> </title>
<!--[if !mso]><!-- -->
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<!--<![endif]-->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
@gonchik
gonchik / jqlActiveUsers.groovy
Created November 27, 2020 14:46
assignee in activeUsers()
// Active users
// assignee in activeUsers()
import com.atlassian.jira.bc.JiraServiceContextImpl
import com.atlassian.jira.bc.user.search.UserSearchParams
import com.atlassian.jira.bc.user.search.UserSearchService
import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.jql.operand.QueryLiteral
import com.atlassian.jira.jql.query.QueryCreationContext
import com.atlassian.jira.user.ApplicationUser
import com.atlassian.query.clause.TerminalClause