Skip to content

Instantly share code, notes, and snippets.

View warpech's full-sized avatar
🤹‍♂️
Code sweet code

Marcin Warpechowski warpech

🤹‍♂️
Code sweet code
View GitHub Profile
@warpech
warpech / README.md
Created November 29, 2017 10:22
An initial list of common, general-purpose web UI patterns
  1. Accordion. A list that can have a single item or multiple items expanded to show more detail.
  2. Alphabetic indices. Renders the characters in a culture’s alphabet in standard order (e.g., as a vertical or horizontal strip). If supplied with a set of strings, the UI will disable those characters which are not found as the initial character of any string.
  3. Async operation button. A button whose caption changes to reflect an operation in progress (e.g., changing from “Sign In” to “Signing In...”) until the operation completes.
  4. Auto-complete. A text input field that helps the user quickly enter strings from a known list.
  5. Auto-format. Applies a collection of heuristics for formatting text: adding smart quotes, converts double hyphens to endashes, etc.
  6. Auto-size text box. A text area that expands to contain its text.
  7. Backdrop. Shows a background region of non-interactive elements behind the region’s main contents.
  8. Blog. Shows some or all of the entries in the indicated RSS feed.
  9. Blog headlin
@warpech
warpech / Convert.cs
Last active September 18, 2018 13:58
Convert ObjectNo to ObjectId
using System;
using System.Linq;
//Usage examples:
//
//star Convert.cs 6513
//star Convert.cs Blx
//
//Warning: the output goes to Starcounter Administrator
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>Noop that returns</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/benchmark/1.0.0/benchmark.min.js"></script>
<script src="./suite.js"></script>
</head>
<body>
<h1>Open the console to view the results</h1>
@warpech
warpech / index.html
Created June 24, 2019 12:23
Object set value vs 2 kinds of Reflect (http://jsbench.github.io/#6e0f72d88905261a0c9fb40beead248a) #jsbench #jsperf
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>Object set value vs 2 kinds of Reflect</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/benchmark/1.0.0/benchmark.min.js"></script>
<script src="./suite.js"></script>
</head>
<body>
<h1>Open the console to view the results</h1>
@warpech
warpech / index.html
Created June 24, 2019 12:25
Object get value vs 2 kinds of Reflect (http://jsbench.github.io/#4619b874d80d83c77f078694657a5673) #jsbench #jsperf
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>Object get value vs 2 kinds of Reflect</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/benchmark/1.0.0/benchmark.min.js"></script>
<script src="./suite.js"></script>
</head>
<body>
<h1>Open the console to view the results</h1>
@warpech
warpech / index.html
Last active June 27, 2019 12:42
Direct assignment vs assignment in a function #jsbench #jsperf (http://jsbench.github.io/#0bd655b5edb3f5b2560c8031c21332c3) #jsbench #jsperf
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>Direct assignment vs assignment in a function #jsbench #jsperf</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/benchmark/1.0.0/benchmark.min.js"></script>
<script src="./suite.js"></script>
</head>
<body>
<h1>Open the console to view the results</h1>
@warpech
warpech / index.html
Last active June 27, 2019 12:49
getOwnPropertyDescriptor vs getPropertyDescriptor #jsbench #jsperf (http://jsbench.github.io/#08ad9b3ff64f2dd2bbbe045f82aaf21b) #jsbench #jsperf
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>getOwnPropertyDescriptor vs getPropertyDescriptor #jsbench #jsperf</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/benchmark/1.0.0/benchmark.min.js"></script>
<script src="./suite.js"></script>
</head>
<body>
<h1>Open the console to view the results</h1>
@warpech
warpech / index.html
Last active June 27, 2019 12:54
Primitive type comparisons (http://jsbench.github.io/#b9f6574b6478e2a9a02ef917c6382ac1) #jsbench #jsperf
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>Primitive type comparisons</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/benchmark/1.0.0/benchmark.min.js"></script>
<script src="./suite.js"></script>
</head>
<body>
<h1>Open the console to view the results</h1>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>Cached inline styles</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/benchmark/1.0.0/benchmark.min.js"></script>
<script src="./suite.js"></script>
</head>
<body>
<h1>Open the console to view the results</h1>
@warpech
warpech / index.html
Last active July 8, 2019 21:02
Ways to set value of a text node (http://jsbench.github.io/#7297168723a156a228fc04f182810336) #jsbench #jsperf
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>Ways to set value of a text node</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/benchmark/1.0.0/benchmark.min.js"></script>
<script src="./suite.js"></script>
</head>
<body>
<h1>Open the console to view the results</h1>