Title | Lanugage | Category |
---|---|---|
C# Environment.SpecialFolder | C# | Generic |
Tomboy - Trac Plugin | C# | Mono.Addins |
Log4Net Standup | C# | Log4Net |
GUI Thread-Safe Updates | C# | Threadding |
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
<# | |
Git Helpers for PowerShell | |
Author: Damian Suess | |
Revision: 2.b - 2018-07-30 (2018-10-03) | |
TODO: | |
- GitCheckIn $message (check-in/push) | |
- GitPush - Set branch tracking or no tracking | |
Change Log: |
The following is an example of how to search SQL Jobs for text using TSQL
-- SQL 2005-2008 - Search all Jobs
SELECT j.job_id, s.srvname, j.name, js.step_id, js.command, j.enabled
FROM msdb.dbo.sysjobs j
JOIN msdb.dbo.sysjobsteps js ON js.job_id = j.job_id
JOIN master.dbo.sysservers s ON s.srvid = j.originating_server_id
WHERE js.command LIKE N'%...%'
The following is an example of how to search tables for a value. It may not be the most efficient but it works
Tested against MS SQL Server 2000-2017
DECLARE @SearchStr nvarchar(100);
SET @SearchStr = 'SEARCH TEXT HERE';
CREATE TABLE #Results (ColumnName nvarchar(370), ColumnValue nvarchar(3630));
Use this script to search through all Stored Procedures to find a particular piece of data. Such as: Table usage, Column Names, etc.
-- [ Find tables using Column and generate SELECT statement ] --
select 'select ''' + o.name + ''' ,* from ' + o.name + ' where ' + c.name + ' = ''...''', * from sysobjects o, syscolumns c
where o.id = c.id and o.xtype = 'u'
and c.name like '%Device_Id%' -- COLUMN NAME HERE
order by o.Name;
The following provides a couple of options on how to search MS SQL stored procedures for text. This can be useful if you're trying to find references to pieces of code or notes.
The following has been tested against MS SQL Server 2000-2016
-- Search Stored Procedures Script
-- Input: Replace '%...%' with you search string. i.e. '%D_Request%'
SELECT ROUTINE_SCHEMA, ROUTINE_NAME, ROUTINE_DEFINITION
FROM INFORMATION_SCHEMA.ROUTINES
More info can be found at, https://docs.microsoft.com/en-us/dotnet/api/system.environment.specialfolder?view=netframework-4.7.2
// C:\ProgramData\
var path1 = System.Environment.GetFolderPath(System.Environment.SpecialFolder.CommonApplicationData);
// C:\Users\USERNAME\AppData\Roaming
var path2 = System.Environment.GetFolderPath(System.Environment.SpecialFolder.ApplicationData);
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
write-host "Removing all older duplicate versions of installed modules"; | |
write-host " 1. be sure to run this as an admin" -foregroundcolor yellow; | |
write-host " 2. (You can update all your Azure RM modules with update-module Azurerm -force)"; | |
$mods = Get-InstalledModule; | |
foreach ($Mod in $mods) | |
{ | |
write-host "Checking '$($mod.name)'"; | |
$latest = Get-InstalledModule $mod.name; |