Skip to content

Instantly share code, notes, and snippets.

View BojoDimov's full-sized avatar
🎧
commiting

Божидар Димов BojoDimov

🎧
commiting
View GitHub Profile
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Animations</title>
</head>
@BojoDimov
BojoDimov / index.html
Created June 14, 2018 10:55
Code snippet for react modal window
class App extends Component {
render() {
return (
<div>
<ActionButton onChange={(accepted) => accepted ? console.log('The user accepted') : console.log('The use declined')}>
Пробвай ме
</ActionButton>
</div>
);
}
@BojoDimov
BojoDimov / BarChart.js
Created November 8, 2018 12:06
D3 Basic chart
import React from 'react';
import * as d3 from 'd3';
import './styles.css';
class BarChart extends React.Component {
render() {
const { data, width, height } = this.props;
return (
<React.Fragment>
<div style="display:flex;flex-direction:column;">
<button [click-once]="testClick">Function as parameter</button>
<!-- [undefined, undefined, undefined] -->
<button [click-once]="testClick2('baba', 'dqdo')">Arrow function closure</button>
<!-- ["baba", "dqdo", "4i4o"] -->
<button [click-once]="testClick3('baba', 'dqdo')">Decorator</button>
<!-- ["baba", "dqdo", undefined] -->
@BojoDimov
BojoDimov / har-stream-processor
Created May 25, 2021 21:21
Extracts XHR from HAR files
// How will this work
// 1. Stream read the json
// https://www.npmjs.com/package/stream-json
// 2. Extract valuable information
// 3. Rewrite/Rewire request urls
// 4. Put Request/Response pairs in the cache
// https://developer.mozilla.org/en-US/docs/Web/API/Cache/put