Skip to content

Instantly share code, notes, and snippets.

View default-writer's full-sized avatar
🚩
creating an app

default-writer default-writer

🚩
creating an app
View GitHub Profile
@default-writer
default-writer / Convert Evaluation Edition to Volume.txt
Created March 24, 2019 08:35 — forked from CHEF-KOCH/Convert Evaluation Edition to Volume.txt
Windows Server LTSC 2019 RTM Evaluations 180 days
Open PowerShell and type:
Standard Edition:
DISM /online /Set-edition:ServerStandard /ProductKey:N69G4-B89J2-4G8F4-WWYCC-J464C /AcceptEula
DataCenter Edition:
DISM /online /Set-edition:ServerDatacenter /ProductKey:WMDGN-G9PQG-XVVXX-R3X43-63DFG /AcceptEula
@default-writer
default-writer / BufferSegment.cs
Created March 27, 2019 10:08
Queued ArrayPool<T> memory strings
public class BufferSegment : IDisposable
{
public BufferSegment(int size) => Buffer = ArrayPool<byte>.Shared.Rent(size);
public byte[] Buffer { get; }
public int ReadBytes { get; set; }
public int WrittenBytes { get; set; }
SELECT
t.NAME AS TableName,
s.Name AS SchemaName,
p.rows AS RowCounts,
SUM(a.total_pages) * 8 AS TotalSpaceKB,
CAST(ROUND(((SUM(a.total_pages) * 8) / 1024.00), 2) AS NUMERIC(36, 2)) AS TotalSpaceMB,
SUM(a.used_pages) * 8 AS UsedSpaceKB,
CAST(ROUND(((SUM(a.used_pages) * 8) / 1024.00), 2) AS NUMERIC(36, 2)) AS UsedSpaceMB,
(SUM(a.total_pages) - SUM(a.used_pages)) * 8 AS UnusedSpaceKB,
CAST(ROUND(((SUM(a.total_pages) - SUM(a.used_pages)) * 8) / 1024.00, 2) AS NUMERIC(36, 2)) AS UnusedSpaceMB
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
<style id="jsbin-css">
@import url('https://fonts.googleapis.com/css?family=Roboto+Mono&display=swap');
* {
@default-writer
default-writer / gist:60a92d4199f3897dfeaad79500cd348d
Created October 5, 2019 12:43
Visual Studio 2019 Product Key
Visual Studio 2019 Enterprise
BF8Y8-GN2QH-T84XB-QVY3B-RC4DF
Visual Studio 2019 Professional
NYWVH-HT4XC-R2WYW-9Y3CM-X4V3Y
@default-writer
default-writer / LikeButton.svelte
Last active December 2, 2024 01:28
React.Component svelte wrapper for React
<script>
import { onMount } from "svelte";
import React from "react";
import ReactDOM from "react-dom";
const e = React.createElement;
class LikeButton extends React.Component {
constructor(props) {
super(props);