Skip to content

Instantly share code, notes, and snippets.

@NimaAra
NimaAra / ZenCoding.html
Created February 16, 2017 22:59
Some examples of Zen Coding in Visual Studio and Web Essentials.
table>tr>td
<table>
<tr>
<td></td>
</tr>
</table>
ul>li*3>lorem
<ul>
<li>Tincidunt integer eu augue augue nunc elit dolor, luctus placerat scelerisque euismod, iaculis eu lacus nunc mi elit, vehicula ut laoreet ac, aliquam sit amet justo nunc tempor, metus vel.</li>
@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 / TSQL-MSSQL-Quickies.sql
Last active December 4, 2017 12:10
TSQL (MSSQL) Quickies
-- CTRL + R | Toggle Results window.
-- CTRL + SHIFT + U | Upper case selected query
SELECT FirstName + ' ' + LastName AS 'Full_Name'
FROM Customer;
-- using Chinook database: https://chinookdatabase.codeplex.com/
SELECT i.InvoiceId, InvoiceDate, UnitPrice, Quantity
FROM Invoice i
INNER JOIN InvoiceLine il ON il.InvoiceId = i.InvoiceId;
@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 / Git Quickies.md
Last active June 6, 2019 23:13
Git commands cheat-sheet
@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 / 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: