Tag Archives: Code

VBA: How to Crack the Caesar Shift with Brute Force

Caesar Brute Force

Imagine you have a combination lock with 4 digits. If you wack your head against a car hood by accident and forget the combination, this means you have a problem with 255 wrong answers and 1 right one. If you had a few days to spare, you could try all of them. The marvelous thing about computers is that they can, quite easily, auto-generate all 256 possibilities and beat the lock senseless with them. Until it opens.

That’s a brute force attack.

Continue reading

Tagged , , , , , , ,

Python: How to Loop through Every Vertex in a Mesh

The Spiral

Sometimes I get embarrassingly excited about being able to do things in Python that I will probably never need to do again. This is one of those times.

I had a mesh—a plane that I had turned into an a spiral walk-way. And I had the thought, this thing can’t have walls. Eventually I want the walk-way to be the center of a large arena that’s coated in fog. And the only way you’d really be able to see that it’s a spiral is if it’s semi-transparent and lined in lights.

Continue reading

Tagged , , , , , , , ,

Python: How to Randomize Rotation in Blender

The Confetti Function

A couple weeks back, I posted a confetti function that was wildly fun to play with, but frustrating because all the confetti was oriented in the same direction.

In the end, I started selecting the individual planes at random to rotate the manually, but well, let’s face it. There were over 200 planes. That was just stupid. Two new lines of Python. That’s all it took. I actually wasn’t even the Python that threw me in the first place—it was the rotation operator.

Continue reading

Tagged , , , , , , , ,

Python: How to List Polygon Intersections in QGIS


You know what I love about programming? Once you know a little bit, you can Frankenstein your way out of a lot of problems.

Recently, I wanted to have a way to check two shapefiles in QGIS to see if their features overlap. I know what you’re thinking—there’s an intersect tool for that. But it just creates a new layer of the intersected areas. I wanted a list of which specific features were intersecting which other specific features in two separate layers.

Continue reading

Tagged , , , , , , , ,

VBA: How to Get a Spreadsheet of File Names

VBA Header

I recently found a really cool article from Software Solutions Online that shows you how to get a list of files in a folder or a list of subfolders in a folder. All the things, basically.

This weekend, I’m adapting that slightly to get a complete list of files within a folder including everything in its subfolders. I know. This is the sort of thing that’s either really interesting or really not, depending on how much you use VBA.

Continue reading

Tagged , , , , ,

VBA: How to Return the Last Row and Column in Excel

VBA Header2

I was done with this week by about noon on Monday, so I’m four and a half days overdue for a Jessica Jones marathon.

Which is why I’m keeping this short and sweet. This week, I learned how to return the last row and column in an Excel spreadsheet. It’s insanely helpful if you want to copy and paste the same information to multiple workbooks using VBA.

Continue reading

Tagged , , , , , ,

VBA: How to Code a Polygon Coordinates Importer


Somehow, a few weeks ago, no doubt as a result of my having enough caffeine in my system to  down a small hippopotamus, I thought it would be a good idea to make a KML to CSV exporter in AutoHotkey. I can’t even claim ignorance this time—I knew VBA was a thing. But the neurons firing in my brain blazed right passed the LOGIC center and crashed head on into the AHK FIXES EVERYTHING node.

Continue reading

Tagged , , , , , , , , ,