Skip to content

Instantly share code, notes, and snippets.

Resharper

Command Shortcut
Select Containing Declaration Ctrl+Shift+[
Extend Selection Ctrl+w
Commands Ctrl+Shift+A
Navigate To Ctrl+Shift+G
Refactor this Ctrl+Shift+R
@NimaAra
NimaAra / NPM Quickies.md
Last active August 22, 2023 08:56
A set of NPM useful commands.

Interactive update of packages

npm i -g npm-check
npm-check -gu

View versions of all installed modules without dependencies:

npm list --depth=0
npm list -g --depth=0
@NimaAra
NimaAra / Sys Admin Quickies.md
Last active August 26, 2021 21:00
A set of useful commands for day-to-day sys admin activities.

Kill Process Remotely

taskkill /IM dotnet.exe /u some-domain\some-user /p somePass /s SOME-MACHINE

Running as:

runas /netonly /user:some-domain\some-user "C:\foo.exe"

File & Directory

Fast Delete:

@NimaAra
NimaAra / JToken.cs
Last active June 26, 2019 23:10
MongoDB Quickies
private void Flatten(JToken token, IDictionary<string, JValue> output, string prefix = "")
{
if (token is JObject jObj)
{
foreach(var item in token)
{
Flatten(item, output, prefix);
}
} else if (token is JArray jArr)
{
@NimaAra
NimaAra / Git Quickies.md
Last active June 6, 2019 23:13
Git commands cheat-sheet
@NimaAra
NimaAra / TypeScript Quickies.md
Last active May 27, 2019 17:06
A set of useful resources related to working with TypeScript

LINQ->TypeScript

Functions

// a function declaration accepting a number and returning a string.
let someFunc: (age: number) => string;
@NimaAra
NimaAra / SQLite Quickies.md
Created February 7, 2019 15:37
Contains various resources relating to SQLite
SELECT 
	date('now') AS [Today],	
	datetime(strftime('%s','now'), 'unixepoch') AS [Now_UTC],
	datetime(strftime('%s','now'), 'unixepoch', 'localtime') AS [Now_Local],
	strftime('%s','now') AS [Now_EPOCH],
	CAST((julianday('now') - 2440587.5)*86400000 AS INTEGER) AS [Now_EPOCH_Ms],
	date('now','start of month','+1 month','-1 day') AS [LastDayOfCurrentMonth],	
	CAST(strftime('%s', '2019-02-07') AS INTEGER) * 1000 AS [GivenDate_EPOCH_Ms],