#!/bin/bash | |
# rename TMS tiles to the XYZ schema | |
# no quoting, since all files have simple numeric names | |
# do not run this anywhere else than INSIDE your tiles directory | |
# run it like this: find . -name "*.png" -exec ./tms2xyz.sh {} \; | |
filename=$1 | |
tmp=${filename#*/} # remove to first / |
This is loosely based around MIT's idea of the missing CS Semester: https://missing.csail.mit.edu/ as well as the Stanford Problem Solving for the CS Technical Interview https://web.stanford.edu/class/cs9/ and here you'll find links to things that I've found useful in my job search over the last month or so.
There are a lot of strategies that you will hear about in the Javascript community for keeping your conditionals from becoming a tangled mess. This isn't like them. This is someting different. MATH! Boolean Algebra to be exact. I use it all the time to simplify complex conditionals. There are two things that you need to know: de Morgan's Theorem, and Karnaugh (pronounced CAR-no) Maps. (Don't worry, there is no test)
De Morgan's Theorem is great distributing nots (!
), and for when you want to convert an &&
to an ||
, or back. This is it:
!(A && B) = !A || !B
--- | |
eleventyExcludeFromCollections: true | |
eleventyComputed: | |
permalink: "{{ site.robots }}" | |
--- | |
Sitemap: {{ site.baseUrl + site.siteMap }} | |
User-agent: * | |
Disallow: |