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
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <title>Title</title> | |
| <style> | |
| body { | |
| position: relative; | |
| background: gray; |
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
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>Bitmap Visualization</title> | |
| <style> | |
| body { | |
| display: flex; | |
| flex-direction: column; |
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
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>DDA Visualization</title> | |
| <style> | |
| canvas { | |
| border: 1px solid black; | |
| display: block; |
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
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <title>Title</title> | |
| <style> | |
| body { | |
| position: relative; | |
| background: gray; |
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 = { | |
| env: { | |
| name: "", | |
| payload: { | |
| price: 0, | |
| size: 0, | |
| }, | |
| }, | |
| }; |
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
| import { isEqual } from 'lodash'; | |
| function getObjectDiff(obj1: any, obj2: any) { | |
| return Object.keys(obj1).reduce((result, key) => { | |
| if (!obj2.hasOwnProperty(key)) { | |
| result.push(key); | |
| } else if (isEqual(obj1[key], obj2[key])) { | |
| const resultKeyIndex = result.indexOf(key); | |
| result.splice(resultKeyIndex, 1); | |
| } |
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 composeSubComponents< | |
| BASE extends React.ComponentType<any>, | |
| SUBCOMPONENTS extends Record<string, React.ComponentType<any>>, | |
| >(baseCmp: BASE, subComponents: SUBCOMPONENTS) { | |
| return Object.assign(baseCmp, subComponents); | |
| } | |
| const DefaultCmp = composeSubComponents(React.memo(FlyCard), { | |
| Layout, |
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 createGraph(nodes, edges) { | |
| const result = nodes.reduce((acc, el) => { | |
| acc[el] = []; | |
| return acc; | |
| }, {}); | |
| for (let edge of edges) { | |
| result[edge[0]].push(edge[1]); | |
| } | |
| return result; | |
| } |
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
| import Vue from "vue"; | |
| Vue.config.productionTip = false; | |
| function getProps(cmpNode) { | |
| return Object.keys(cmpNode.dataset) | |
| .filter((propKey) => propKey.startsWith("prop")) | |
| .reduce((acc, propKey) => { | |
| const propName = propKey.slice(4).toLowerCase(); | |
| return { |
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 path = require("path"); | |
| const Git = require("nodegit"); | |
| const pathToRepo = path.resolve("./.git"); | |
| async function main({ otherBranch }) { | |
| const res = await getGitDiffsFromCurrent({ otherBranch }); | |
| console.log(JSON.stringify(res)); | |
| } |
NewerOlder