When making this website, i wanted a simple, reasonable way to make it look good on most displays. Not counting any minimization techniques, the following 58 bytes worked well for me:
main {
max-width: 38rem;
padding: 2rem;
margin: auto;
}
using System; | |
using System.Collections; | |
using System.Collections.Generic; | |
using System.Globalization; | |
using System.Linq; | |
using System.Text; | |
using Microsoft.Extensions.DependencyInjection; | |
using Microsoft.Extensions.Hosting; | |
using Microsoft.Extensions.Logging; |
public class CustomEventHubDataAdapter : EventHubDataAdapter | |
{ | |
private readonly SerializationManager serializationManager; | |
public CustomEventHubDataAdapter(SerializationManager serializationManager) | |
: base(serializationManager) | |
{ | |
this.serializationManager = serializationManager; | |
} |
function replaceHome($pathArray) { | |
# Check whether the first three paths are equal to HOME | |
# If it is, it substitutes it for ~ | |
# Change this accordingly, if your home path is more than three | |
# paths long. | |
$splitChar = [System.IO.Path]::DirectorySeparatorChar | |
if ( ($pathArray.Length -gt 2) -and | |
(($pathArray[0..2] -join $splitChar) -eq $HOME)) { | |
@("~") + $pathArray[3..$pathArray.Length] | |
} |
# Licensed under the MIT license. | |
# Copyright (C) 2017 Kristofer Liljeblad | |
# Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the | |
# "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, | |
# publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, | |
# subject to the following conditions: | |
# The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. |
# LVDB - LLOOGG Memory DB | |
# Copyriht (C) 2009 Salvatore Sanfilippo <antirez@gmail.com> | |
# All Rights Reserved | |
# TODO | |
# - cron with cleanup of timedout clients, automatic dump | |
# - the dump should use array startsearch to write it line by line | |
# and may just use gets to read element by element and load the whole state. | |
# - 'help','stopserver','saveandstopserver','save','load','reset','keys' commands. | |
# - ttl with milliseconds resolution 'ttl a 1000'. Check ttl in dump! |
This gist had a far larger impact than I imagined it would, and apparently people are still finding it, so a quick update:
(async main(){...}())
as a substitute for TLA. This completely eliminates the blocking problem (yay!) but it's less powerful, and harder to statically analyse (boo). In other words the lack of TLA is causing real problemsI'll leave the rest of this document unedited, for archaeological
import {ValidationError} from 'aurelia-validation'; | |
export class AjvValidator { | |
cache = new Map; | |
ajv = new Ajv({ v5: true, allErrors: true, format: 'full' }); | |
validateObject(object) { | |
this.parseSchema(object); | |
let schemaId = this._schemaId(object); | |
if (!this.cache.has(schemaId)) { |
<?xml version="1.0" encoding="utf-8" ?> | |
<!-- ******************************************************************* | |
This is Joel "Jaykul" Bennett's coloring format file for PowerShell 5.1 | |
******************************************************************** --> | |
<Configuration> | |
<SelectionSets> | |
<SelectionSet> | |
<Name>FileSystemTypes</Name> | |
<Types> | |
<TypeName>System.IO.DirectoryInfo</TypeName> |
Note: Following features are tested on Windows 10 Preview Build 10074 environment
Windows 10 Preview contains PSReadLine module at "%ProgramFiles%\WindowsPowerShell\Modules" (WMF 5.0 Preview don't contain this modules)
PSReadLine is automatically loaded when PSConsoleHost launched(if available). This feature can be controlled by following command.