Pew Pew Laser Blog

Code. Glass art. Games. Baking. Cats. From Seattle, Washington and various sundry satellite locations.

Blogs about tooling

AWS Easy Mode == Architect.

5.16.2018

While severely belated, I wanted to take a bit of time to talk about a really nifty project that I learned about at EmpireConf 2017 last October. In her talk "Architecture as Text (AWS Easy Mode)", Angelina Fabbro talked about .architect - an open source project which handles provisioning of AWS / Lamda servers through the `.arc` file - a plaintext manifest file. The most amazing and wonderful fact is that with .architect in Angelina's demo, the servers were provisioned faster than DNS propagation.

Also of note, she's got a great definition for "Serverless": Functions (the var func = new Function(arg){} kind) as a service, not a web server. Abstract away the notion of a server altogether.

For more info on .architect, definitely check out the talk from EmpireConf, or the website at https://arc.codes/.

Handy Regexes for Search and Replace.

3.26.2018

Sublime Text - my favorite editor - will let you use a regular expression (regex) in its search and replace functionality. Here are some handy regexes that I've used in the past:

Any anchors
href=\"[^\s]*\"
Any dollar value
\$[0-9.,]+
All HTML comments and their contents
<!--(.|\s)*?-->
Either "alpha" or "beta"
(alpha|beta)
Any blank lines
^\n
Any pair of "s not preceeded by ="
[^=]""
Sass mixins
@mixin .* \{
Sass extends
\%[^\s]*

Inkscape - Using Path > Difference With Text.

3.3.2018

It turns out that Inkscape's error messages will appear in the status bar at the bottom of the application.

Part of getting my Glowforge laser cutter has been learning to use a new piece of software, Inkscape. I was having problems using Inkscape's "Path > Difference" option to combine (well, cut out) shapes and text elements. Here's what I had to do to get the elements merged:

  1. Optional: Disable any stroke styles on both objects. Use fills instead.
  2. Optional: Make sure the first element - the non-text - is a path. Select it and choose "Path > Object to Path".
  3. Turn the text into a path. Select it and choose "Path > Object to Path".
  4. Ungroup that new path. Right click it and choose "Ungroup".
  5. Bring the "top" element to the top layer (Home). This is what will be removed from the other element.
  6. Position / align the elements as desired.
  7. Select both of the elements.
  8. Choose "Path > Difference".

Keyboard Shortcuts for Web Dev Tools Inspector and Console.

12.7.2017

Sometimes, right clicking on something in a browser and picking "Inspect" from the context menu just isn't fast enough for me. I wanted to find a way to quickly open the Inspector and Console tabs in a browser's web developer tools, so naturally I turned to keyboard shortcuts. I've compiled a reference of the commands for Firefox and Chrome here.

Firefox:

Even better, the Web Dev tools will open up - with the last active tab - when you hit your F12 key. (In OSX, use fn F12 if you haven't enabled the "Use all F1, F2, etc keys as standard function keys" Keyboard Preference.)

Chrome:

Spinning Up a New GitHub Pages Site.

9.11.2017

Pages might just be one of my favorite things about GitHub. Though I often use them for lists of links to go along with my presentations, they are capable of much more complex static sites.

Here is a quick reminder of how to set up a new GitHub Pages site:

  1. Create a new repo on GitHub.
  2. Don't create any new files yet, even licenses or readmes. If you have already created files, then stash them.
  3. Clone that repo locally and check out a new gh-pages branch (git checkout -b gh-pages).
  4. Pop any files you've stashed. Add any other files you want in your repo.
  5. Commit the changes, and then push the gh-pages branch up to Github.

You're done! You can now view your new page at https://[your-user-name].github.io/[your-repo-name]/.

If you have somehow ended up with a master branch with commits, you can remove it thusly:

More blogs about tooling: