Skip to content

Instantly share code, notes, and snippets.

-- Run before deleting .ndf file that causes error
-- DBCC showfilestats
DBCC ShrinkFile($LogicalFilename, EMPTYFILE)
https://punchsalad.com/ssl-certificate-generator/
@echo off
title Activate Office 365 ProPlus for FREE - MSGuides.com&cls&echo ============================================================================&echo #Project: Activating Microsoft software products for FREE without software&echo ============================================================================&echo.&echo #Supported products: Office 365 ProPlus (x86-x64)&echo.&echo.&(if exist "%ProgramFiles%\Microsoft Office\Office16\ospp.vbs" cd /d "%ProgramFiles%\Microsoft Office\Office16")&(if exist "%ProgramFiles(x86)%\Microsoft Office\Office16\ospp.vbs" cd /d "%ProgramFiles(x86)%\Microsoft Office\Office16")&(for /f %%x in ('dir /b ..\root\Licenses16\proplusvl_kms*.xrm-ms') do cscript ospp.vbs /inslic:"..\root\Licenses16\%%x" >nul)&(for /f %%x in ('dir /b ..\root\Licenses16\proplusvl_mak*.xrm-ms') do cscript ospp.vbs /inslic:"..\root\Licenses16\%%x" >nul)&echo.&echo ============================================================================&echo Activating your Office...&cscript //nologo slmgr.vbs /ck
Visual Studio 2019 Product Key
Visual Studio 2019 Enterprise
BF8Y8-GN2QH-T84XB-QVY3B-RC4DF
Visual Studio 2019 Professional
NYWVH-HT4XC-R2WYW-9Y3CM-X4V3Y
main();
function main() {
var project = app.project;
var seq = app.project.sequences;
var vTrack = seq[0].videoTracks[0];
@haroldcris
haroldcris / Single Instance
Created November 28, 2019 20:52
Focus App if Instance exist
taken from
https://stackoverflow.com/questions/5990118/maximize-window-from-the-main-function/32322918#32322918
static class Program
{
private static volatile bool _exitProcess;
/// <summary>
/// The main entry point for the application.
@haroldcris
haroldcris / Age.cs
Created November 14, 2019 00:57 — forked from faisalman/Age.cs
Calculate Age (Years + Months + Days) in C#
/**
* Calculate Age in C#
* https://gist.github.com/faisalman
*
* Copyright 2012-2013, Faisalman <[email protected]>
* Licensed under The MIT License
* http://www.opensource.org/licenses/mit-license
*/
using System;
@haroldcris
haroldcris / gist:f96bb4827edfc358a8a2a666eff94f0f
Created July 30, 2019 00:54
Solution for ClosedConnection
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12 | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls;
/*============================================================================
File: ShortPeriodIOLatencies.sql
Summary: Short snapshot of I/O latencies
SQL Server Versions: 2005 onwards
------------------------------------------------------------------------------
Written by Paul S. Randal, SQLskills.com
(c) 2014, SQLskills.com. All rights reserved.
private static string GenerateRandomOtp(int iOTPLength)
{
string[] saAllowedCharacters = { "1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z" };
string sOTP = String.Empty;
string sTempChars = String.Empty;
Random rand = new Random();
for (int i = 0; i < iOTPLength; i++)
{