Skip to content

Instantly share code, notes, and snippets.

View evgenyt1's full-sized avatar
🎯
Focusing

Evgeny evgenyt1

🎯
Focusing
View GitHub Profile
@evgenyt1
evgenyt1 / webpack-css-module.js
Last active June 21, 2022 13:45
Webpack5 and CSS Modules config to enable human readable stable CSS class names
{
loader: "css-loader",
options: {
modules: {
getLocalIdent: (loaderContext, _localIdentName, localName, options) => {
const relativeResourcePath = path.relative(
options.context,
loaderContext.resourcePath
);
// no need for /src and and .module.scss in
@evgenyt1
evgenyt1 / 1.ps1
Created June 4, 2021 16:22
Get SQL Server product key from registry
Function Get-SqlServerKeys {
<#
.SYNOPSIS
Gets SQL Server Product Keys from local and remote SQL Servers. Works with SQL Server 2005-2014
.DESCRIPTION
Using a string of servers, a text file, or Central Management Server to provide a list of servers, this script will go to each server and get the product key for all installed instances. Clustered instances are supported as well. Requires regular user access to the SQL instances, SMO installed locally, Remote Registry enabled and acessible by the account running the script.
Uses key decoder by Jakob Bindslet (http://goo.gl/1jiwcB)
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://expofp.com/floorplans/datajs.schema.json",
"title": "ExpoFP data.js Schema",
"type": "object",
"required": ["title", "homeUrl", "logo", "booths", "exhibitors", "categories"],
"additionalProperties": false,
"properties": {
"title": {
"type": "string"
@evgenyt1
evgenyt1 / TimeService.cs
Created November 25, 2012 18:09
TimeService for .NET with ability to change Now/UtcNow/Today for testing purposes
using Microsoft.Win32;
using System;
namespace GarageTools
{
/// <summary>
/// Mocks DateTime Now/UtcNow/Today properties and allows setting them
/// (stores time shift in registry).
/// </summary>
/// <remarks>
@evgenyt1
evgenyt1 / ImageResizeModule.cs
Created November 23, 2012 17:46
ImageResizeModule for ASP.NET
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Drawing.Imaging;
using System.IO;
using System.Security.Cryptography;
using System.Text;
using System.Text.RegularExpressions;
using System.Web;