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 |
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
| enum ByteFormatMode { | |
| Binary, // 1024-based (KiB, MiB, GiB - IEC standard) | |
| Decimal, // 1000-based (KB, MB, GB - SI standard) | |
| Pseudo // 1024-based but uses KB/MB/GB (Windows-style) | |
| } | |
| function formatBytes(bytes: number, mode: ByteFormatMode = ByteFormatMode.Binary): string { | |
| const suffixesBinary = ["bytes", "KiB", "MiB", "GiB", "TiB", "PiB", "EiB", "ZiB", "YiB", "RiB", "QiB"]; | |
| const suffixesDecimal = ["bytes", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB", "RB", "QB"]; | |
| const suffixesPseudo = ["bytes", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB", "RB", "QB"]; |
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
| https://www.perplexity.ai/search/can-you-find-me-information-re-Kv6Kcel1R..clYeGhwa6xg | |
| OK, so to put this down to the Level of an intelligent 12year old: | |
| First normal form is violated if | |
| A) cells have multiple values inside the same cell (e.g. separated by separator) | |
| or | |
| B) there are repeating columns for the same thing, e.g. Tel1, Tel2, Tel3, | |
NewerOlder