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
| relabel_configs: | |
| - source_labels: [__address__] | |
| target_label: instance | |
| regex: "([^:]+).*" | |
| replacement: '${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
| xattr -d com.apple.quarantine /path/to/file |
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
| kind: Pod | |
| apiVersion: v1 | |
| metadata: | |
| name: volume-debugger | |
| spec: | |
| volumes: | |
| - name: volume-to-debug | |
| persistentVolumeClaim: | |
| claimName: <pvc to mount> | |
| containers: |
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
| # Left side | |
| defaults write com.apple.dock persistent-apps -array-add '{tile-type="spacer-tile";}' | |
| killall Dock | |
| # Right Side | |
| defaults write com.apple.dock persistent-others -array-add '{tile-data={}; tile-type="spacer-tile";}' | |
| killall Dock |
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 @OS_TotalMemory INT | |
| ,@OS_CPUCount INT | |
| ,@OS_Reserved INT | |
| ,@SQL_MAlloc INT | |
| SELECT @OS_TotalMemory = CAST(total_physical_memory_kb AS INT) / 1024 / 1024 FROM sys.dm_os_sys_memory | |
| SELECT @OS_CPUCount = cpu_count FROM sys.dm_os_sys_info | |
| SELECT @OS_Reserved = 4 | |
| SELECT @SQL_MAlloc = ((@OS_TotalMemory - (@OS_CPUCount * 0.5) - @OS_Reserved) - (@OS_TotalMemory - (@OS_CPUCount * 0.5) - @OS_Reserved) % 2) * 1024 |
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
| EXEC sys.sp_configure N'show advanced options', 1 | |
| GO | |
| RECONFIGURE WITH OVERRIDE | |
| GO | |
| DECLARE @DOP INT | |
| SELECT @DOP = CASE | |
| WHEN cpu_count > 16 THEN 8 | |
| else cpu_count / 2 |
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 'ALTER AUTHORIZATION ON DATABASE::' + QUOTENAME(d.[name]) + ' to sa' | |
| FROM [sys].[databases] d | |
| INNER JOIN [sys].[server_principals] s ON s.sid = d.owner_sid | |
| WHERE d.[name] NOT IN ('master','msdb','model','tempdb') | |
| AND s.[name] <> 'sa' |
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 'ALTER DATABASE ' + QUOTENAME(name) + ' SET AUTO_SHRINK OFF WITH NO_WAIT;' AS [To Execute] | |
| FROM sys.databases | |
| WHERE is_auto_shrink_on = 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
| SELECT 'EXEC msdb.dbo.sp_update_job @job_id=N''' + CAST(j.job_id AS VARCHAR(150)) + ''', @owner_login_name=N''sa'' ' | |
| FROM msdb.dbo.sysjobs AS j | |
| INNER JOIN master.sys.syslogins AS L | |
| ON j.owner_sid = L.sid | |
| INNER JOIN msdb.dbo.syscategories AS C | |
| ON C.category_id = j.category_id | |
| WHERE msdb.dbo.SQLAGENT_SUSER_SNAME(j.owner_sid) <> 'sa'; |
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
| SET NOCOUNT ON | |
| DECLARE @SchemaName NVARCHAR(100) = 'mipl' | |
| SELECT 'DROP ' + | |
| CASE WHEN type IN ('P','PC') THEN 'PROCEDURE' | |
| WHEN type = 'U' THEN 'TABLE' | |
| WHEN type IN ('IF','TF','FN') THEN 'FUNCTION' | |
| WHEN type = 'V' THEN 'VIEW' | |
| END + | |
| ' ' + QUOTENAME(SCHEMA_NAME(schema_id))+'.'+QUOTENAME(name) as DropStatement |
NewerOlder