<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Unindented — Home of Daniel Perez Alvarez</title><link>https://www.unindented.org/</link><description>Recent content by Daniel Perez Alvarez</description><generator>Hugo 0.126.3</generator><language>en-us</language><managingEditor>daniel@unindented.org (Daniel Perez Alvarez)</managingEditor><webMaster>daniel@unindented.org (Daniel Perez Alvarez)</webMaster><copyright>All content by Daniel Perez Alvarez unless otherwise noted. Some rights reserved.</copyright><lastBuildDate>Wed, 17 May 2023 00:00:00 +0000</lastBuildDate><atom:link href="https://www.unindented.org/rss.xml" rel="self" type="application/rss+xml"/><item><title>QR Code Generator</title><link>https://www.unindented.org/playground/qr-code-generator/</link><pubDate>Wed, 17 May 2023 00:00:00 +0000</pubDate><author>daniel@unindented.org (Daniel Perez Alvarez)</author><guid>https://www.unindented.org/playground/qr-code-generator/</guid><description>&lt;p class="lead">Whip up a QR code that can be scanned by anyone with a smartphone or a QR code reader. All thanks to the awesome &lt;a
href="https://github.com/Rich-Harris/headless-qr"
target="_blank" rel="noreferrer"
>&lt;code>headless-qr&lt;/code>&lt;/a
> module by &lt;a
href="https://github.com/Rich-Harris"
target="_blank" rel="noreferrer"
>Rich Harris&lt;/a
>.&lt;/p></description></item><item><title>Clipboard Inspector</title><link>https://www.unindented.org/playground/clipboard-inspector/</link><pubDate>Thu, 05 Jan 2023 00:00:00 +0000</pubDate><author>daniel@unindented.org (Daniel Perez Alvarez)</author><guid>https://www.unindented.org/playground/clipboard-inspector/</guid><description>&lt;p class="lead">Small widget to explore the data available when you paste or drop something on a web page.&lt;/p></description></item><item><title>Change Shell to Latest Bash on macOS</title><link>https://www.unindented.org/blog/change-shell-to-latest-bash-on-macos/</link><pubDate>Wed, 04 Jan 2023 00:00:00 +0000</pubDate><author>daniel@unindented.org (Daniel Perez Alvarez)</author><guid>https://www.unindented.org/blog/change-shell-to-latest-bash-on-macos/</guid><description>&lt;p class="lead">Starting with macOS Catalina, &lt;a
href="https://support.apple.com/HT208050"
target="_blank" rel="noreferrer"
>Apple switched the default shell from Bash to Zsh&lt;/a
>. Also, the built-in version of Bash is horribly outdated. No bueno.&lt;/p></description></item><item><title>Create a Bootable USB for macOS Ventura</title><link>https://www.unindented.org/blog/create-bootable-usb-for-macos/</link><pubDate>Sun, 01 Jan 2023 00:00:00 +0000</pubDate><author>daniel@unindented.org (Daniel Perez Alvarez)</author><guid>https://www.unindented.org/blog/create-bootable-usb-for-macos/</guid><description>&lt;p class="lead">I find it useful to have a bootable USB lying around, in case I need to do a clean install, or recover from catastrophic failures.&lt;/p></description></item><item><title>Terminal Color Preview</title><link>https://www.unindented.org/playground/terminal-color-preview/</link><pubDate>Thu, 19 May 2022 00:00:00 +0000</pubDate><author>daniel@unindented.org (Daniel Perez Alvarez)</author><guid>https://www.unindented.org/playground/terminal-color-preview/</guid><description>&lt;p class="lead">I&amp;rsquo;ve been playing with terminal color schemes lately, and wanted a way of quickly previewing my changes, so I built this.&lt;/p></description></item><item><title>Baby Smash!</title><link>https://www.unindented.org/playground/baby-smash/</link><pubDate>Thu, 28 Apr 2022 00:00:00 +0000</pubDate><author>daniel@unindented.org (Daniel Perez Alvarez)</author><guid>https://www.unindented.org/playground/baby-smash/</guid><description>&lt;p class="lead">My kids love &lt;a
href="https://www.hanselman.com/babysmash/"
target="_blank" rel="noreferrer"
>Baby Smash!&lt;/a
>, a Windows app that draws letters and shapes, and plays sounds, as they smash the keyboard and mouse.&lt;/p>
&lt;p>This is a crude attempt to replicate it using web technologies. We can&amp;rsquo;t capture certain key combinations and gestures, so it&amp;rsquo;s not very baby-safe.&lt;/p></description></item><item><title>Mandelbrot Set with WebGL</title><link>https://www.unindented.org/playground/mandelbrot-set-with-webgl-shaders/</link><pubDate>Tue, 19 Apr 2022 00:00:00 +0000</pubDate><author>daniel@unindented.org (Daniel Perez Alvarez)</author><guid>https://www.unindented.org/playground/mandelbrot-set-with-webgl-shaders/</guid><description>&lt;p class="lead">Plotting the &lt;a
href="https://en.wikipedia.org/wiki/Mandelbrot_set"
target="_blank" rel="noreferrer"
>Mandelbrot set&lt;/a
> with a GLSL fragment shader.&lt;/p>
&lt;p>I&amp;rsquo;ve translated the code I wrote for &lt;a
href="https://www.unindented.org/playground/mandelbrot-set-with-p5/"
>plotting the Mandelbrot set with p5.js&lt;/a
> to a GLSL 1.0 fragment shader. The main difference is that I&amp;rsquo;m using &lt;code>vec2&lt;/code> to represent complex numbers, which makes things a bit more concise.&lt;/p></description></item><item><title>Mandelbrot Set with AssemblyScript / WebAssembly</title><link>https://www.unindented.org/playground/mandelbrot-set-with-assemblyscript-wasm/</link><pubDate>Wed, 13 Apr 2022 00:00:00 +0000</pubDate><author>daniel@unindented.org (Daniel Perez Alvarez)</author><guid>https://www.unindented.org/playground/mandelbrot-set-with-assemblyscript-wasm/</guid><description>&lt;p class="lead">Plotting the &lt;a
href="https://en.wikipedia.org/wiki/Mandelbrot_set"
target="_blank" rel="noreferrer"
>Mandelbrot set&lt;/a
> with &lt;a
href="https://www.assemblyscript.org"
target="_blank" rel="noreferrer"
>AssemblyScript&lt;/a
>, a TypeScript-like language that compiles to WebAssembly bytecode.&lt;/p>
&lt;p>I&amp;rsquo;ve translated the code I wrote for &lt;a
href="https://www.unindented.org/playground/mandelbrot-set-with-p5/"
>plotting the Mandelbrot set with p5.js&lt;/a
> to AssemblyScript, to get a feel for it.&lt;/p></description></item><item><title>Mandelbrot Set with p5.js</title><link>https://www.unindented.org/playground/mandelbrot-set-with-p5/</link><pubDate>Thu, 07 Apr 2022 00:00:00 +0000</pubDate><author>daniel@unindented.org (Daniel Perez Alvarez)</author><guid>https://www.unindented.org/playground/mandelbrot-set-with-p5/</guid><description>&lt;p class="lead">The &lt;a
href="https://en.wikipedia.org/wiki/Mandelbrot_set"
target="_blank" rel="noreferrer"
>Mandelbrot set&lt;/a
>, named after &lt;a
href="https://en.wikipedia.org/wiki/Benoit_Mandelbrot"
target="_blank" rel="noreferrer"
>Benoit Mandelbrot&lt;/a
>, is the set of complex numbers $c$ for which the function $f_c(z)=z^2+c$ does not diverge to infinity when iterated from $z=0$.&lt;/p>
&lt;p>I&amp;rsquo;m using the pseudocode from the Wikipedia article &lt;a
href="https://en.wikipedia.org/wiki/Plotting_algorithms_for_the_Mandelbrot_set"
target="_blank" rel="noreferrer"
>Plotting algorithms for the Mandelbrot set&lt;/a
> as base, and applying different coloring algorithms.&lt;/p></description></item><item><title>Inspect WebViews in Any macOS App</title><link>https://www.unindented.org/blog/inspect-webviews-in-any-macos-app/</link><pubDate>Mon, 04 Apr 2022 00:00:00 +0000</pubDate><author>daniel@unindented.org (Daniel Perez Alvarez)</author><guid>https://www.unindented.org/blog/inspect-webviews-in-any-macos-app/</guid><description>&lt;p class="lead">Did you know you can inspect any WebView on any macOS app, just by right-clicking it?&lt;/p></description></item><item><title>WebRTC without Signaling Server</title><link>https://www.unindented.org/playground/webrtc-without-signaling-server/</link><pubDate>Thu, 31 Mar 2022 00:00:00 +0000</pubDate><author>daniel@unindented.org (Daniel Perez Alvarez)</author><guid>https://www.unindented.org/playground/webrtc-without-signaling-server/</guid><description>&lt;p class="lead">I was reading &lt;a
href="https://developer.mozilla.org/docs/Web/API/WebRTC_API/Signaling_and_video_calling"
target="_blank" rel="noreferrer"
>MDN&amp;rsquo;s article on signaling and video calling&lt;/a
>, and encountered this part:&lt;/p>
&lt;blockquote>
&lt;p>WebRTC is a fully peer-to-peer technology for the real-time exchange of audio, video, and data, with &lt;mark>one central caveat&lt;/mark>. A form of discovery and media format negotiation must take place, as discussed elsewhere, in order for two devices on different networks to locate one another. This process is called signaling and involves both devices &lt;mark>connecting to a third, mutually agreed-upon server&lt;/mark>. Through this third server, the two devices can locate one another, and exchange negotiation messages.&lt;/p>
&lt;/blockquote>
&lt;p>It then goes on to talk about &lt;a
href="https://developer.mozilla.org/docs/Glossary/SDP"
target="_blank" rel="noreferrer"
>SDP&lt;/a
>, the protocol used to exchange signaling information, and guides you through implementing a video-calling app.&lt;/p>
&lt;p>I started wondering, do you really need that third server? Is there anything preventing peers from exchanging the SDP offer and answer through some other means, like IRC or similar? It turns out there&amp;rsquo;s not!&lt;/p></description></item><item><title>Compress Strings with lz‑string</title><link>https://www.unindented.org/playground/lz-string/</link><pubDate>Wed, 30 Mar 2022 00:00:00 +0000</pubDate><author>daniel@unindented.org (Daniel Perez Alvarez)</author><guid>https://www.unindented.org/playground/lz-string/</guid><description>&lt;p class="lead">I wanted to compress some large strings in JavaScript, for an &lt;a
href="https://www.unindented.org/playground/webrtc-without-signaling-server/"
>experiment with WebRTC&lt;/a
>, and found the excellent &lt;a
href="https://pieroxy.net/blog/pages/lz-string/index.html"
target="_blank" rel="noreferrer"
>&lt;code>lz-string&lt;/code>&lt;/a
> by &lt;a
href="https://pieroxy.net/"
target="_blank" rel="noreferrer"
>pieroxy&lt;/a
>.&lt;/p>
&lt;p>It&amp;rsquo;s fast, and it weighs just a little over 4KB if you run it through something like &lt;a
href="https://terser.org/"
target="_blank" rel="noreferrer"
>Terser&lt;/a
>. I&amp;rsquo;ve tweaked it ever so slightly for my needs, but it should still be 100% compatible with the original. You can play with it below.&lt;/p></description></item><item><title>Prime Spiral with p5.js</title><link>https://www.unindented.org/playground/prime-spiral-with-p5/</link><pubDate>Sun, 06 Mar 2022 00:00:00 +0000</pubDate><author>daniel@unindented.org (Daniel Perez Alvarez)</author><guid>https://www.unindented.org/playground/prime-spiral-with-p5/</guid><description>&lt;p class="lead">The prime spiral, also known as &lt;a
href="https://en.wikipedia.org/wiki/Ulam_spiral"
target="_blank" rel="noreferrer"
>Ulam spiral&lt;/a
>, is a neat visualization of prime numbers devised by mathematician &lt;a
href="https://en.wikipedia.org/wiki/Stanislaw_Ulam"
target="_blank" rel="noreferrer"
>Stanisław Ulam&lt;/a
>.&lt;/p></description></item><item><title>JWT Decoder in the Browser</title><link>https://www.unindented.org/playground/jwt-decoder/</link><pubDate>Thu, 22 Apr 2021 00:00:00 +0000</pubDate><author>daniel@unindented.org (Daniel Perez Alvarez)</author><guid>https://www.unindented.org/playground/jwt-decoder/</guid><description>&lt;p class="lead">Decode &lt;a
href="https://en.wikipedia.org/wiki/JSON_Web_Token"
target="_blank" rel="noreferrer"
>JSON web tokens&lt;/a
> right in the browser. Nothing gets recorded, everything is done client-side.&lt;/p></description></item><item><title>Colored Noise — White, Pink, and Red</title><link>https://www.unindented.org/playground/colored-noise/</link><pubDate>Mon, 23 Nov 2020 00:00:00 +0000</pubDate><author>daniel@unindented.org (Daniel Perez Alvarez)</author><guid>https://www.unindented.org/playground/colored-noise/</guid><description>&lt;p class="lead">Using the &lt;a
href="https://developer.mozilla.org/docs/Web/API/Web_Audio_API"
target="_blank" rel="noreferrer"
>Web Audio API&lt;/a
> to generate noise of different colors.&lt;/p></description></item><item><title>SVG Line Animation</title><link>https://www.unindented.org/playground/svg-line-animation/</link><pubDate>Mon, 01 Dec 2014 00:00:00 +0000</pubDate><author>daniel@unindented.org (Daniel Perez Alvarez)</author><guid>https://www.unindented.org/playground/svg-line-animation/</guid><description>&lt;p class="lead">You know that cool animation that &lt;a
href="https://www.polygon.com/"
target="_blank" rel="noreferrer"
>Polygon&lt;/a
> used in their &lt;a
href="https://www.polygon.com/a/xbox-one-review"
target="_blank" rel="noreferrer"
>Xbox One&lt;/a
> and &lt;a
href="https://www.polygon.com/a/ps4-review"
target="_blank" rel="noreferrer"
>PS4&lt;/a
> reviews, where SVG images appeared to draw progressively? It&amp;rsquo;s really easy to do.&lt;/p></description></item><item><title>Pixel Art Scaling Comparison — Part 2</title><link>https://www.unindented.org/blog/pixel-art-scaling-comparison-part-2/</link><pubDate>Fri, 18 Apr 2014 00:00:00 +0000</pubDate><author>daniel@unindented.org (Daniel Perez Alvarez)</author><guid>https://www.unindented.org/blog/pixel-art-scaling-comparison-part-2/</guid><description>&lt;p class="lead">I&amp;rsquo;ve been playing with a few other scaling algorithms in the &lt;a
href="https://code.google.com/p/2dimagefilter/"
target="_blank" rel="noreferrer"
>2dimagefilter&lt;/a
> project. They produce even more impressive results than the previous batch.&lt;/p></description></item><item><title>Pixel Art Scaling Comparison — Part 1</title><link>https://www.unindented.org/blog/pixel-art-scaling-comparison-part-1/</link><pubDate>Fri, 11 Apr 2014 00:00:00 +0000</pubDate><author>daniel@unindented.org (Daniel Perez Alvarez)</author><guid>https://www.unindented.org/blog/pixel-art-scaling-comparison-part-1/</guid><description>&lt;p class="lead">I&amp;rsquo;ve been playing with a few scaling algorithms in the &lt;a
href="https://code.google.com/p/2dimagefilter/"
target="_blank" rel="noreferrer"
>2dimagefilter&lt;/a
> project. They produce impressive results when fed pixel art, and the fact that emulators can run them in real-time is just mind-boggling.&lt;/p></description></item><item><title>Compare Two Images Side-by-Side</title><link>https://www.unindented.org/playground/image-compare/</link><pubDate>Wed, 09 Apr 2014 00:00:00 +0000</pubDate><author>daniel@unindented.org (Daniel Perez Alvarez)</author><guid>https://www.unindented.org/playground/image-compare/</guid><description>&lt;p class="lead">Small widget to compare two images side by side, for my articles on pixel art scaling (parts &lt;a
href="https://www.unindented.org/blog/pixel-art-scaling-comparison-part-1/"
>one&lt;/a
> and &lt;a
href="https://www.unindented.org/blog/pixel-art-scaling-comparison-part-2/"
>two&lt;/a
>).&lt;/p></description></item><item><title>Zoom into an Image</title><link>https://www.unindented.org/playground/image-zoom/</link><pubDate>Mon, 07 Apr 2014 00:00:00 +0000</pubDate><author>daniel@unindented.org (Daniel Perez Alvarez)</author><guid>https://www.unindented.org/playground/image-zoom/</guid><description>&lt;p class="lead">Small widget that simulates a magnifying glass, for my articles on pixel art scaling (parts &lt;a
href="https://www.unindented.org/blog/pixel-art-scaling-comparison-part-1/"
>one&lt;/a
> and &lt;a
href="https://www.unindented.org/blog/pixel-art-scaling-comparison-part-2/"
>two&lt;/a
>).&lt;/p></description></item><item><title>Lorenz Attractor with JS</title><link>https://www.unindented.org/playground/lorenz-attractor-with-js/</link><pubDate>Sun, 16 Feb 2014 00:00:00 +0000</pubDate><author>daniel@unindented.org (Daniel Perez Alvarez)</author><guid>https://www.unindented.org/playground/lorenz-attractor-with-js/</guid><description>&lt;p class="lead">Drawing a &lt;a
href="https://en.wikipedia.org/wiki/Lorenz_system"
target="_blank" rel="noreferrer"
>Lorenz attractor&lt;/a
> by absolutely positioning &lt;code>span&lt;/code> elements along the &lt;em>x&lt;/em> and &lt;em>y&lt;/em> axes, and faking the &lt;em>z&lt;/em> axis by adjusting their size.&lt;/p></description></item><item><title>Lorenz Attractor with CSS</title><link>https://www.unindented.org/playground/lorenz-attractor-with-css/</link><pubDate>Sat, 15 Feb 2014 00:00:00 +0000</pubDate><author>daniel@unindented.org (Daniel Perez Alvarez)</author><guid>https://www.unindented.org/playground/lorenz-attractor-with-css/</guid><description>&lt;p class="lead">Drawing a &lt;a
href="https://en.wikipedia.org/wiki/Lorenz_system"
target="_blank" rel="noreferrer"
>Lorenz attractor&lt;/a
> with CSS shadows. No JavaScript involved.&lt;/p></description></item><item><title>3D Shapes with CSS</title><link>https://www.unindented.org/playground/3d-shapes-with-css/</link><pubDate>Sat, 08 Feb 2014 00:00:00 +0000</pubDate><author>daniel@unindented.org (Daniel Perez Alvarez)</author><guid>https://www.unindented.org/playground/3d-shapes-with-css/</guid><description>&lt;p class="lead">Rotating 3D shapes with CSS transforms and animations. No JavaScript involved.&lt;/p></description></item><item><title>Trigonometry in Sass</title><link>https://www.unindented.org/blog/trigonometry-in-sass/</link><pubDate>Fri, 07 Feb 2014 00:00:00 +0000</pubDate><author>daniel@unindented.org (Daniel Perez Alvarez)</author><guid>https://www.unindented.org/blog/trigonometry-in-sass/</guid><description>&lt;p class="lead">Have you ever found yourself needing trigonometric functions like sine, cosine, and tangent when writing your &lt;a
href="https://sass-lang.com/"
target="_blank" rel="noreferrer"
>Sass&lt;/a
> stylesheets? Ok, probably not, but the day may come, and you&amp;rsquo;ll be glad you read this.&lt;/p></description></item><item><title>GitHub Ribbon Using CSS Transforms</title><link>https://www.unindented.org/blog/github-ribbon-using-css-transforms/</link><pubDate>Sun, 12 Jan 2014 00:00:00 +0000</pubDate><author>daniel@unindented.org (Daniel Perez Alvarez)</author><guid>https://www.unindented.org/blog/github-ribbon-using-css-transforms/</guid><description>&lt;p class="lead">You know those &lt;a
href="http://github.com/blog/273-github-ribbons"
target="_blank" rel="noreferrer"
>&amp;lsquo;Fork me on GitHub&amp;rsquo; ribbons&lt;/a
> that you often see on websites for open source projects? &lt;a
href="https://twitter.com/mojombo"
target="_blank" rel="noreferrer"
>Tom Preston-Werner&lt;/a
> released them in &lt;em>December 2008&lt;/em>! Gosh, I feel old.&lt;/p></description></item></channel></rss>