A tweet-sized debugger for visualizing your CSS layouts. Outlines every DOM element on your page a random (valid) CSS hex color.
One-line version to paste in your DevTools
Use $$
if your browser aliases it:
~ 108 byte version
(* | |
F# Game of life | |
Philip Jander | |
@ph_j | |
2015 | |
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License. | |
https://creativecommons.org/licenses/by-nc-sa/3.0/ | |
*) |
class Chain<T> { | |
private Chain() { } | |
private readonly List<T> _Chain = new List<T>(); | |
public static Chain<T> Start => new Chain<T>(); | |
public Chain<T> this[T This_] { | |
get { this._Chain.Add(This_); return this; } |
<template> | |
<div class="filtered-table"> | |
<table> | |
<thead> | |
<tr class="columns"> | |
<th v-for="column in columns" :key="column.name" class="column">{{ column.text }}</th> | |
</tr> | |
<tr class="filters"> | |
<td v-for="column in columns" :key="column.name" class="filter"> | |
<input @input="column.setTerms($event.target.value)"/> |
Function Get-ProcessMemory { | |
<# | |
.SYNOPSIS | |
Get a snapshot of a process' memory usage. | |
.DESCRIPTION | |
Get a snapshot of a process' memory usage based on its workingset value. You can get the same information using Get-Process or by querying the Win32_Process WMI class with Get-CimInstance. This command uses Invoke-Command to gather the information remotely. Many of the parameters are from that cmdlet. | |
Technically you can use wildcards with process names, but because of how the function aggregates data, you might not see the results you expect. | |
.EXAMPLE | |
PS C:\> get-processmemory code,powershell,powershell_ise |
Husky makes it straightforward to implement git hooks. Work with a team and want to enforce coding standards across the team? No problem! Husky lets you require everyone to automatically lint and tests their code before committing or pushing to the repository.
https://github.com/typicode/husky
Dotenv is a zero-dependency module that loads environment variables from a .env file into process.env. Storing configuration in the environment separate from code is based on The Twelve-Factor App methodology.
function getStartOfWeek() { | |
begin { | |
$base = [DayOfWeek]::Monday | |
} | |
process { | |
$difference = $_.DayOfWeek - $base | |
$offset = (7 + $difference) % 7 * -1 | |
function combineIds() { | |
param( | |
[Parameter()] | |
[Guid]$First, | |
[Parameter()] | |
[Guid]$Second | |
) |
public static class ReadFromCsv { | |
public static IEnumerable<IDictionary> asKeyValuePairs(this TextReader Reader_, string Delimiter_ = ";") { | |
var splitThis = Delimiter_.asSplitter(); | |
var result = new List<Dictionary<string, object>>(); | |
var columns = splitThis(Reader_.ReadLine()); |
$sample = @( | |
[PSCustomObject]@{ | |
From = [datetime]::Parse("01.01.2022 00:00:00") | |
To = [datetime]::Parse("10.01.2022 23:59:59") | |
} | |
[PSCustomObject]@{ | |
From = [datetime]::Parse("05.01.2022 00:00:00") | |
To = [datetime]::Parse("15.01.2022 23:59:59") | |
} | |
[PSCustomObject]@{ |