Skip to content

Instantly share code, notes, and snippets.

View rooks's full-sized avatar

Alexander Lobankov rooks

View GitHub Profile
@rooks
rooks / csv.js
Last active September 6, 2024 17:00
CodeMirror rainbow CSV mode
const DELIM = ','
const QUOTE = '"'
const MAX_LENGTH = 9
const tokenRainbow = state => `string num${state.num}`
const tokenPlain = () => 'string'
CodeMirror.defineMode('csv', function modeCsv(opts, modeOpts) {
let { delimiter = DELIM, rainbow = false } = modeOpts
let token = rainbow ? tokenRainbow : tokenPlain
public static class StructureMapDecoratorHelperExtension
{
public static DecoratorHelper<TTarget> Decorate<TTarget>(this SmartInstance<TTarget> instance)
{
return new DecoratorHelper<TTarget>(instance);
}
}
public class DecoratorHelper<TTarget>
{
/* title */
body {
background: #d6e1d1;
width: 100%;
height: 100%;
margin: 0;
position: absolute;
}