Skip to content

Instantly share code, notes, and snippets.

@Fil
Last active July 27, 2017 22:29
Show Gist options
  • Save Fil/13177d3c911fb8943cb0013086469b87 to your computer and use it in GitHub Desktop.
Save Fil/13177d3c911fb8943cb0013086469b87 to your computer and use it in GitHub Desktop.
GNU parallel logo
license: mit

Challenged by @curran

<!DOCTYPE html>
<head>
<meta charset="utf-8">
<script src="https://d3js.org/d3.v4.min.js"></script>
<style>
body { margin:0;position:fixed;top:0;right:0;bottom:0;left:0; }
</style>
</head>
<body>
<script>
// Feel free to change or delete any of the code you see in this editor!
var svg = d3.select("body").append("svg")
.attr("width", 960)
.attr("height", 500)
svg.selectAll('g')
.data(d3.range(9))
.enter()
.append('g')
.attr('transform', d => `translate(${20 + 2*((d+2)%5) - 2*((1-d)%3)}, ${20 + d*15})`)
.selectAll('rect')
.data(d3.range(15))
.enter()
.append('rect')
.attr('x', d => d * 20)
.attr("width", 20)
.attr("height", 15)
.attr('fill', d => (d%2) ? 'black':'white')
.attr('stroke', d => (d%2) ? '#888':'black')
var text = svg.append('text')
.attr('font-size', 50)
.attr('font-family', 'sans-serif')
.attr('transform', 'translate(20,210)')
text.append('tspan').text('GNU ')
text.append('tspan').text('para').attr('font-weight', 'bold')
text.append('tspan').text('ll').attr('font-weight', 'bold').attr('font-style', 'italic').attr('dx', -3)
text.append('tspan').text('el').attr('font-weight', 'bold').attr('dx', 1)
</script>
</body>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment