Skip to content

Instantly share code, notes, and snippets.

Jarek Foksa jarek-foksa

Block or report user

Report or block jarek-foksa

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View full_example.html
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="node_modules/xel/themes/material.css">
<script src="node_modules/xel/xel.min.js"></script>
<style>
body, html{
height: 100%;
width: 100%;
}
@jarek-foksa
jarek-foksa / index.html
Last active May 11, 2019 — forked from SMotaal/README.md
Electron 2.x demo app that demonstrates how to enable ES modules support.
View index.html
<!DOCTYPE html>
<html>
<head>
<base href="app://./" />
<meta http-equiv="Content-Security-Policy" content="script-src 'self' app:; object-src 'self' app:;">
<script type="module" src="./module.js"></script>
</head>
<body>
Check the console!
View harmonize-path-data.js
// @info
// Takes normalized path data and harmonizes it so that each subpath starts with "M" seg, followed by one or
// more "C" or "L" segs, optionally followed by "Z" seg.
let harmonizePathData = (pathData) => {
if (!pathData.find(($0) => $0.type === "C" || $0.type === "L")) return [];
let simplifiedPathData = [];
let lastType = null;
let currentX = 0;
View gist:74a8958fdb1598e4ec489341b56073d1
/**
* @copyright
* © 2016 Scott Hyndman
* @doc
* https://material.google.com/material-design/elevation-shadows.html
* https://docs.google.com/document/d/1W3NGSLqDZzjbBBLW2C6y_6NUxtvdZAVaJvg58LY3Q0E/preview#
* @src
* http://codepen.io/shyndman/pen/ojxmdY
* http://codepen.io/shyndman/pen/MaYoaV
View css-tokenizer.js
// @copyright
// © 2009-2012 Nicholas C. Zakas
// © 2012-2016 Jarosław Foksa
//
// @doc
// https://drafts.csswg.org/css-syntax
//
// @info
// CSS tokenizer based on TokenStream.js and Tokens.js from CSSLint.
View decomposed-transform.js
// @copyright
// © 2005, 2006, 2013 Apple Inc. All rights reserved.
// © 2009 Torch Mobile, Inc.
// © 2016 Jarosław Foksa
// @src
// https://drafts.csswg.org/css-transforms-1/#recomposing-to-a-3d-matrix
// http://trac.webkit.org/browser/trunk/Source/WebCore/platform/graphics/transforms/TransformationMatrix.cpp
let {abs, sqrt, asin, sin, cos, tan, atan2} = Math;
View compile-script.js
let compileScript = (content, relPath) => {
let Compiler = traceur.syntax.Compiler;
let Options = traceur.util.Options;
let options = new Options(traceur.Compiler.prototype.defaultOptions);
options.setFromObject({
arrayComprehension: true,
asyncFunctions: true,
asyncGenerators: true,
forOn: true,
View compile-script.js
let compileScript = (content, relPath) => {
let Compiler = traceur.syntax.Compiler;
let Options = traceur.util.Options;
let options = new Options(traceur.Compiler.prototype.defaultOptions);
options.setFromObject({
arrayComprehension: true,
asyncFunctions: true,
asyncGenerators: true,
forOn: true,
View bx-starpath.js
// @copyright
// © 2015 Jarosław Foksa
import {createElement} from "../utils/dom";
import {round, sin, cos, degToRad, PI} from "../utils/math";
import {collapseWhitespace} from "../utils/string";
const STAR_PATH_DATA_ATTRIBUTES = [
"data-bx-cx",
View bx-hueslider.css
/*
* @copyright
* © 2012-2015 Jarosław Foksa
*/
:host {
width: 100px;
height: 35px;
display: block;
You can’t perform that action at this time.