Skip to content

Instantly share code, notes, and snippets.

@DenVdmj
DenVdmj / pocket-guide-to-writing-svg.cover.ru.svg
Last active June 27, 2018 18:03
Русский вариант обложки книги Джони Трайтел «Карманное руководство по написанию SVG»
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@DenVdmj
DenVdmj / jsfiddle.js
Last active June 21, 2018 07:15
Toggle left sidebar button for jsfiddle.net
const prefix = 'VdMj';
const class_hidden = `${prefix}-hidden-sidebar`;
const class_button = `${prefix}-menu-button`;
const styles = [
`body.${class_hidden} #sidebar { display: none !important }`,
`body.${class_hidden} #content { margin-left: 0 !important }`,
`#actions > nav > div:first-child > a.${class_button} {
font-size: 1.6em;
font-family: segoe ui symbol, apple color emoji, segoe ui emoji, notocoloremoji, android emoji, emojisymbols, emojione mozilla;
@DenVdmj
DenVdmj / background.js
Created May 4, 2018 01:57 — forked from Rob--W/background.js
Implementation example of writable response bodies for Chromium extensions (API draft).
/**
* Implementation example of writable response bodies.
* Based on the draft of the Streams API (19 March 2014)
* https://dvcs.w3.org/hg/streams-api/raw-file/tip/Overview.htm
* Design document for response body reading/writing:
* https://docs.google.com/document/d/1iE6M-YSmPtMOsec7pR-ILWveQie8JQQXTm15JKEcUT8
*/
/* globals chrome, ByteStream, URL, XMLHttpRequest */
'use strict';
console.info('flac player init start');
const copy = (el, props) => {
for (let [key, val] of Object.entries(props)) {
el[key] = val;
}
};
const audioElements = [];
@DenVdmj
DenVdmj / index.html
Created June 13, 2018 22:09
RegExp Optimization (es6)
<html>
<head>
<title>RegExp optimization</title>
<meta charset="utf-8" />
</head>
<body>
<h1>RegExp Optimization</h1>
<button create-regexp>Create RegExp from words list</button>
<textarea input>
a, abbr, acronym, address, applet, area,

I'm investigating the way to draw bezier curves / nurbs etc. with shaders, here is a list a links and information I found that can improve render times with OF. Any way I must admit I'm new to openGL & shaders so maybe someone can take this to implement maybe an add-on or maybe to added to the core.

Resolution Independent Curve Rendering using Programmable Graphics Hardware https://www.microsoft.com/en-us/research/wp-content/uploads/2005/01/p1000-loop.pdf

Resolution independent GPU accelerated Curve & Font rendering GPU based Resolution Independent Font & Curve Rendering – initial Release http://jausoft.com/blog/2011/04/01/resolution-independent-gpu-accelerated-curve-font-rendering/ http://ramisantina.com/blog/?p=73 http://vimeo.com/21810192

@DenVdmj
DenVdmj / ff.manifest.json
Last active June 30, 2018 01:59
Добавляет на каждую страницу Хабра кнопку перехода на http://sohabr.so и http://itnan.ru
{
"manifest_version": 2,
"name": "sohabr.net button",
"description": "sohabr.net button for habr.com",
"version": "0.0.1.0",
"icons": {
"64": "sohabr.png"
},
"applications": {
"gecko": {
@DenVdmj
DenVdmj / background.js
Last active June 30, 2018 02:14
Enable brotli supporting for http requests. Chrome extension.
chrome.webRequest.onBeforeSendHeaders.addListener(details => {
let headers = details.requestHeaders;
let header = headers.find(header => /accept-encoding/i.test(header.name));
if (header) {
header.value = header.value.split(/\s*,\s*/).concat('br').join(', ');
}
return { requestHeaders: headers }
}, {
urls: ['*://*/*']