Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@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)
{
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 / 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], 
@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 / CSS3 Animation Quickies.css
Created August 23, 2017 22:10
CSS3 Animation Quickies
/*
Animation timing functions
* ease: Slow start, then fast, then end slowly (default)
* linear: The same speed from start to end
* ease-in: With a slow start
* ease-out: With a slow end
* ease-in-out: With a slow start and end
* cubic-bezier(n,n,n,n): Lets you define your own values in a cubic-bezier function
*/
@NimaAra
NimaAra / Git Quickies.md
Last active June 6, 2019 23:13
Git commands cheat-sheet
@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: