This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| SELECT TOP 1 * | |
| INTO #foo | |
| FROM T_Benutzer | |
| ; | |
| IF OBJECT_ID('tempdb..#NOT_foo') IS NOT NULL DROP TABLE [#foo]; -- this is presumed buggy | |
| -- Find leaking temp-tables |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Windows Registry Editor Version 5.00 | |
| [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\SSRS\CPE] | |
| "CustomerFeedback"=dword:00000000 | |
| "EnableErrorReporting"=dword:00000000 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| # | |
| # restart_xrdp.sh - Interactive restart for xrdp related services | |
| # | |
| echo "Select what to restart:" | |
| echo "1) chansrv" | |
| echo "2) xrdp" | |
| echo "3) xrdp-sesman" | |
| echo "4) xrdp + xrdp-sesman" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| # | |
| # kill_rider.sh - Kill all processes containing "rider" (case-insensitive) | |
| # | |
| # List matching processes first for safety, excluding this script itself | |
| echo "🔍 Matching processes:" | |
| ps aux | grep -i rider | grep -v grep | grep -v kill_rider.sh | |
| # Ask for confirmation before killing |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| DECLARE @sql national character varying(1000); | |
| DECLARE @restart_value bigint; | |
| SET @restart_value = ISNULL( | |
| ( | |
| SELECT ISNULL(MAX(ifcd_drawing_id), 0) FROM ifc.ifc_drawings | |
| ) | |
| , 0) + 1; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| IF NOT EXISTS | |
| ( | |
| SELECT * FROM INFORMATION_SCHEMA.TABLES | |
| WHERE TABLE_TYPE = 'BASE TABLE' | |
| AND TABLE_SCHEMA = 'dbo' | |
| AND TABLE_NAME = 'room' | |
| ) | |
| BEGIN | |
| EXECUTE(N' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| DECLARE @sql nvarchar(MAX); | |
| DECLARE object_cursor CURSOR FOR | |
| SELECT | |
| N' | |
| ;WITH CTE AS | |
| ( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sudo apt-get remove --purge google-chrome-stable | |
| cd ~/Downloads | |
| wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb | |
| sudo dpkg -i google-chrome-stable_current_amd64.deb | |
| sudo apt-get update | |
| sudo dpkg-divert --divert /usr/bin/original-google-chrome-stable --rename /usr/bin/google-chrome-stable | |
| dpkg-divert --list |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| SELECT | |
| sch.name AS referenced_schema | |
| ,o.name AS referended_object | |
| ,o.type_desc AS referenced_object_type | |
| -- ,pk_cols.COLUMN_NAME AS primary_key_column | |
| FROM sys.sql_expression_dependencies AS d | |
| JOIN sys.objects AS o ON d.referenced_id = o.object_id | |
| JOIN sys.schemas AS sch ON sch.schema_id = o.schema_id |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| SELECT TOP 100 | |
| qt.text AS sql_query | |
| ,qs.last_execution_time | |
| ,qs.execution_count | |
| ,sd.name AS db | |
| FROM sys.dm_exec_query_stats AS qs | |
| CROSS APPLY sys.dm_exec_sql_text(qs.sql_handle) AS qt |
NewerOlder