В стандартных реализациях поддерживаюся
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Cross-Origin Read Blocking (CORB) blocked cross-origin response http://0.0.0.0:8612/graphql with MIME type application/json. | |
See https://www.chromestatus.com/feature/5629709824032768 for more details. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bumblebeed -vv --driver nvidia # start demon in debug mode | |
optirun -vvv glxgears # start optirun in debug mode | |
grep -i glx /var/log/Xorg.0.log # glx loading log |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export function chainQueries(queries) { | |
const defaultOptions = { errorPolicy: 'all' }; | |
const checkLoadingAndError = allData => allData.loading || allData.error; | |
const maybeFunction = (t, args) => typeof t === 'function' ? t(args) : t; | |
const findQueryName = query => query.definitions[0].selectionSet.selections[0].name.value; | |
const queryNamesBuffer = []; | |
const pipeline = queries.map((q, i)=> { | |
if (q.kind === 'Document') { // Not sure about this way for detect query |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Find branch in tree by omen pair - key-value | |
* @param {Object} omen - how to find branch. Example - { id: 123456 } | |
* @param {Object} options [{children: 'children', returnChild: true}]; | |
* @param {Boolean} options.returnChild - | |
* if true return branch started from found child, | |
* else return whole branch where child founded | |
*/ | |
function findBranchByOmen(omen, options) { | |
const [[omenProp, omenValue]] = Object.entries(omen); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"childrens": [ | |
{ | |
"name": "foo_lvl_1", | |
"childrens": [ | |
{ | |
"name": "foo1_lvl_2", | |
"value": 13 | |
}, | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const data = | |
[ | |
{ | |
"val": 30, | |
"children": [ | |
{ | |
"val": 123, | |
"children": [ | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Create array of unique entries in dataset (not deep) | |
* @Example | |
* const data = [ { regionId: 123, indicatorId: 345 }, { regionId: 123, indicatorId: 345 }, { regionId: 678, indicatorId: 910 }] | |
* extractListFrom('regionId', 'indicatorId')(data); | |
*/ | |
export function extractListFrom(...args) { | |
const accum = args.reduce((ac, arg) => { ac[arg] = new Set(); return ac }, {}); | |
return data => data.reduce((acc, m) => { | |
Object.keys(acc).forEach(key => acc[key].add(m[key])) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function createSVG(d) { | |
const xmlns = "http://www.w3.org/2000/svg"; | |
const boxWidth = 300; | |
const boxHeight = 300; | |
const svgElem = document.createElementNS(xmlns, "svg"); | |
svgElem.setAttributeNS(null, "viewBox", "0 0 " + boxWidth + " " + boxHeight); | |
svgElem.setAttributeNS(null, "width", boxWidth); | |
svgElem.setAttributeNS(null, "height", boxHeight); | |
svgElem.setAttributeNS(null, "fill", "none"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const https = require('https'); | |
const { StringDecoder } = require('string_decoder'); | |
/** | |
* Simple Node.js script to turn a specific page on a Google Sheet | |
* into a JSON object for the main purpose of HTML Templating. | |
* | |
* @author jonobr1 / http://jonobr1.com | |
* @author akiyamka / [email protected] | |
* |