This file contains 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 { spawn } = require('child_process'); | |
const args = process.argv.slice(2); | |
const child = spawn('tree',['-f', '--', args[0] || '.']); | |
child.stdout.setEncoding('utf8'); | |
child.stdout.on('data', (chunk) => { | |
const lines = chunk.split(/\n/g).filter(line=>line!==''&&!line.match(/^\d/)); | |
lines.forEach(line=>console.log(line.replace(/([^ \n]*?)([^ /\n]*)$/,'[$2]($1$2)'))); | |
}); |
This file contains 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 React, {Component} from 'react'; | |
import {format as d3format} from 'd3-format'; | |
import {scaleLinear} from 'd3-scale'; | |
import {hierarchy, treemap} from 'd3-hierarchy'; | |
import styled from 'styled-components'; | |
import {select} from "d3-selection"; | |
import {sum} from 'd3-array'; | |
import {nest} from 'd3-collection'; | |
const StyledSVG = styled.svg` |
This file contains 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 rgbToHsl([r, g, b]) { | |
r /= 255, g /= 255, b /= 255; | |
var max = Math.max(r, g, b), min = Math.min(r, g, b); | |
var h, s, l = (max + min) / 2; | |
if (max == min) { | |
h = s = 0; // achromatic | |
} else { | |
var d = max - min; |
This file contains 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
#!/usr/local/bin/bash | |
clear | |
# just for formatting | |
b=$(tput bold) | |
n=$(tput sgr0) | |
declare -A reppos |
This file contains 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
/** | |
* Created by Dominik Maszczyk (https://www.linkedin.com/in/dominik-maszczyk/) | |
* on 30/10/17. | |
*/ | |
import React, {Component, PureComponent} from "react"; | |
import "./style.css"; | |
class Resizer extends PureComponent { | |
onDrag = (e) => { | |
let horizontal = this.props.orientation === "horizontal", |
This file contains 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() { | |
'use strict'; | |
/** | |
* @ngdoc directive_template | |
* @name app.controller:d3Directive | |
* @author Dominik Maszczyk | |
* @email [email protected] | |
* @description | |
* # d3Directive |
NewerOlder