This file contains 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
WITH c1 | |
AS (SELECT | |
o.name AS tablename, | |
c.colid, | |
CONVERT(varchar(10), c.colid) + '|' + c.name + '|' + t.name + '|' + CONVERT(varchar(10), c.length) + '|' AS markdown | |
FROM sysobjects o | |
INNER JOIN syscolumns c | |
ON c.id = o.id | |
INNER JOIN systypes t | |
ON t.xtype = c.xtype |
This file contains 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
$reg = Get-ChildItem -Recurse -Name privateregistry.bin -Path $env:LOCALAPPDATA\Microsoft\VisualStudio\ | |
$key = $reg.Substring(0, $reg.Length - 20) | |
reg load 'HKU\VS2017PrivateRegistry\' "$env:LOCALAPPDATA\Microsoft\VisualStudio\$reg" | |
New-ItemProperty -Path "HKU:\VS2017PrivateRegistry\Software\Microsoft\VisualStudio\$key\Debugger" -Name DisableAttachSecurityWarning -PropertyType DWORD -Value 1 -Force | |
[gc]::collect() | |
reg unload 'HKU\VS2017PrivateRegistry' |
This file contains 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
function Backup { | |
param( | |
[Parameter(Mandatory = $True)][string]$Inputs, | |
[Parameter(Mandatory = $True)][string]$FullBackup, | |
[string]$DiffBackup = $null, | |
[string]$7ZPath = "C:\Program Files\7-Zip\7z.exe", | |
[string]$UpdateSwitch = "-up0q0r2x2y2z0w2!" | |
) | |
if ($DiffBackup -eq $null) { | |
& $7ZPath a -mhe -ms=off -ssw -mx= -t7z $FullBackup $Inputs |
This file contains 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
echo `git rev-parse HEAD` > .git/info/grafts ; git log --decorate ; rm -R .git/refs/original/ ; git filter-branch -- --all; git push --force |
This file contains 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
Private Sub Application_NewMailEx(ByVal EntryIDCollection As String) | |
Dim objNS As Outlook.NameSpace | |
Dim objEmail As Outlook.MailItem | |
Dim strIDs() As String | |
Dim intX As Integer | |
strIDs = Split(EntryIDCollection, ",") | |
For intX = 0 To UBound(strIDs) | |
Set objNS = Application.GetNamespace("MAPI") |
This file contains 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
Pattern: (?:\b|\B)@([a-zA-Z0-9_]*[a-zA-Z0-9_]+)\w* | |
Replace: <a href="https://twitter.com/$1" target="_blank">@$1</a> |
This file contains 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
Pattern: (?:\b|\B)#(\w*[a-zA-Z]+)\w* | |
Replace: <a href="https://twitter.com/hashtag/$1" target="_blank">#$1</a> |
This file contains 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
cd %TEMP% | |
del %TEMP%\*.* /S /Q | |
rd /S /Q %TEMP%\ |
This file contains 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
Get-ChildItem *.vspscc -Recurse | %{Write-Host "Deleting *.vssscc -> "$_.FullName ; Remove-Item $_.FullName -Force};Get-ChildItem *.vssscc -Recurse | %{Write-Host "Deleting *.vspscc -> "$_.FullName ; Remove-Item $_.FullName -Force};Get-ChildItem *.sln -Recurse | %{$name=$_.FullName ; Write-Host "Changing *.sln -> "$name ; Copy-Item $name $name".bak" -Force ; (Get-Content $name -Raw) | %{$_ -replace "(?s)\tGlobalSection\(TeamFoundationVersionControl\).*?EndGlobalSection","" }| Set-Content $name -Encoding UTF8 -Force ; Write-Host "Backup File -> "$name".bak"} |