Skip to content

Instantly share code, notes, and snippets.

View MohamedSahbi's full-sized avatar
🎳
Having fun at work

Mohamed Sahbi MohamedSahbi

🎳
Having fun at work
View GitHub Profile
@MohamedSahbi
MohamedSahbi / tsql-cheatsheet.md
Last active December 20, 2023 01:11
A cheat sheet for T-SQL database administration

T-SQL Database Administration Cheat Sheet

Credits

I collected these commands mainly from Microsoft Documentation. Credits goes to Microsofts Docs unless credits are stated under the code snippet.

Commands

Select Login

SELECT * FROM sys.sql_logins WHERE name = 'myapp';
@vctr-moraes
vctr-moraes / MSTest Unit Testing Framework Cheat Sheet on Gist.md
Last active April 26, 2023 08:54
MSTest Unit Testing Framework Cheat Sheet on Gist

MSTest Unit Testing Framework Cheat Sheet on Gist

Installation

Install-Package MSTest.TestFramework

Install-Package MSTest.TestAdapter

Install-Package Microsoft.NET.Test.Sdk

Attributes (v2.x.)

  • [TestMethod]
@nweldev
nweldev / nodejs_installer.ps1
Last active April 25, 2023 10:40
Powershell script installing nodejs (with git) and some npm packages
write-host "`n ## NODEJS INSTALLER ## `n"
### CONFIGURATION
# nodejs
$version = "4.4.7-x64"
$url = "https://nodejs.org/dist/latest-v4.x/node-v$version.msi"
# git
$git_version = "2.9.2"
@rafaeltuelho
rafaeltuelho / openshift-cheatsheet.md
Last active May 9, 2024 15:40
My Openshift Cheatsheet

My Openshift Cheatsheet

Project Quotes, Limits and Templates

  • Cluster Quota
oc create clusterquota env-qa \
    --project-label-selector environment=qa \
    --hard pods=10,services=5
    
oc create clusterquota user-qa \
Function Get-ConsoleAsHtml
{
############################################################################################################
# Get-ConsoleAsHtml.ps1
#
# The script captures console screen buffer up to the current cursor position and returns it in HTML format.
#
# Returns: UTF8-encoded string.
#