I've been known to rant about streaming UX in the past. At least this time my blog isn't rendered in JavaScript , so maybe we'll manage to stay on topic. Yesterday, I tried to watch the 9th episode of Survivor 41. I say tried because apparently my computer science degree and 12 years of experience writing software are not sufficient to the task. Normally I would accomplish said task using my…
This is a dump of everything I've learned about running 64 bit ARM on QEMU. General Notes I get the feeling that VGA isn't really supported on the -M virt machine. Closest I've been able to get is using ramfb, but I still can't start X. I think it might be best to use a specific qemu device such as a raspi. Alpine aarch64 best settings qemu-system-aarch64 \ -M virt \ -cpu cortex-a57 \ -smp 4 \ -m…
I have a project idea that could involve doing some scraping of YouTube videos, so I started poking around the HTML output of curling YT links. These things are a site (sp) to behold. If you curl the following well-known URL and store it in a file: https://www.youtube.com/watch?v=dQw4w9WgXcQ Just searching for the title yields 14 results, spread throughout random HTML and JS. But it's only…
My personal cURL cheat sheet Downloading files Resuming failed download Need to make sure filename is the same in order for it to automatically determine the offset. The - after -C tells it to use the output file to determine where to continue from. curl -O -C - https://example.com/dir/filename.bin Output filename -O uses the filename from the end of the path. curl -O…
Somehow I never heard about json.tool until just now. It's built in to Python and provides a simple way to pretty-print JSON on the CLI: echo '{"og": "hi there"}' | python -m json.tool { "og": "hi there" } This is a nice alternative if you have Python installed and don't want to take the time to install jq .
At work we use node+Webpack+Vue+Vuetify. In any isolated in-my-text-editor programming moment, this is more often than not a fantastic, almost magical experience. It's so easy to find and compose different powerful components and libraries. I truly feel like a wizard. But more and more, it seems that it's the in-between moments that are starting to define my relationship with these tools. Our…
Perhaps the most concerning thing about the SARS-CoV-2 virus is that you can be simultaneously asymptomatic and contagious, for days. In a perfect world, we could all just stay away from each other indefinitely until we have some sort of a solution. Real-world constraints won't allow that. Since some amount of human interaction is unavoidable, we need to look for other tools to help control the…
Google Analytics ("GA") is free and easy to use. The reason it's free is because Google is using you to get to your users. Every time someone visits your site without a blocker, Google fingerprints their browser and tracks them across sites they visit. This information is used to send that person targeted ads and manipulate them into buy crap they don't need. So how do we get the convenience and…
This is getting out of hand. First, I wrote an unrelated post, and Hacker News got a little upset with me about my blog requiring JavaScript. I ultimately agreed with them. To redeem myself, I updated my site to not just serve static HTML, but to be entirely browsable with nothing but cURL. Full background and details in this post . However, I kept going down the rabbit hole, wondering how simple…
While trying to find a way to redirect NoScript users to the text version of my site , I discovered HTML redirects . How did I not know about these before?! Basically, it's a way to tell the browser to navigate to a different URL, without HTTP codes or JavaScript. To use it on my site, I just put the following in the head of my index.html: < noscript > < meta http-equiv = "refresh" content = "0;…
Update: The insanity has gone even deeper and this site is now browsable using plain TCP . TL;DR - This site is now browsable from the command line using cURL. Give it a try: curl https://apitman.com/txt/17 Yesterday , I wrote a quick rant essentially whining about how I couldn't figure out how to get my Roku smart TV to play a video I was hosting. I ended the post with the following: When you…
I want to tell you about something I was unable to accomplish, after more than 30 minutes of concerted effort. I have video file hosted using a web server. The file is H.264 main-profile encoded at a reasonable bitrate (<5Mbps), uses AAC audio, and is packaged in an MP4 container. The web server supports HTTP range requests. In other words, the video is basically in the least common denominator…
I recently started looking at libfuse. It wasn't immediately obvious to me how to compile the examples, such as this one . A naive gcc -lib hello.c yielded these errors: In file included from /usr/include/fuse/fuse.h:26, from /usr/include/fuse.h:9, from hello.c:23: /usr/include/fuse/fuse_common.h:33:2: error: #error Please add -D_FILE_OFFSET_BITS=64 to your compile flags! 33 | #error Please add…
Introduction We love talking about "fatigue" in the JavaScript community. You know what I've been getting a bit fatigued by lately? This: I've been thinking a lot about dependencies. This is something of a brain dump. I'll start by giving my working definition of what a dependency is, then I'll go through a list of common dependencies. Finally, I'll present a simple model I've started using for…
In an interactive software application, any user action SHOULD result in a noticeable change within 16ms, actionable information within 32ms, and at least one full screen of content within 64ms.
It took me a sadly long time to realize my new website wasn't working at all on iOS safari (likely not desktop either). That's one of the pitfalls with making it a single page app. I still think the tradeoffs are worth it though. Anyway, I needed a way to debug it, since Safari Web Inspector relies on having a Mac, and I'm on linux. Turns out this isn't a new problem, and the folks at google have…
Note: This post originally appeared on Fullstack React here . Introduction and Motivation In this post, we're going to show how to compile some Rust code to WebAssembly, and integrate it into a React app. Why would we want to do this? It has become very popular in recent years for JavaScript to be used as a compilation target. In other words, developers are writing code in other languages, and…
NOTE 2019-09-01 : This is an old post that I never really finished and published. You may notice that it ends rather abruptly. Ironically, I remembered it while re-writing my website as a single page app using plain JS. But although I'm no longer using the method or tools described here for my site, I think it's an interesting snapshot of where I was at in my thinking last year, and I don't want…
Introduction This post will cover how to get a simple static Rust executable running inside a barebones Docker container. This allows you to compile static Rust binaries for a single platform (Docker, or more specifically Linux x86), and run them on any operating system which can run Docker. Although Rust already compiles to a lot of platforms , I think this method could still be useful in some…
Update 2019-05-22 : There is now a Russian translation of this post here . Thanks Vlad! This tutorial will cover the basics of creating a minimal React app which can be deployed as a statically-linked Rust binary. What this accomplishes is having all of your code, including HTML, JavaScript, CSS, and Rust, packaged into a single file that will run on pretty much any 64-bit Linux system, regardless…
I love the Vimium extension for Chrome . It basically provides VIM keybindings for Chrome. But some of the bindings randomly quit working a while back, probably after a Chrome update. A quick search didn't yield a simple fix, so I just put up with it for an embarrassingly long time. Finally today I did a bit more digging. Some of the issues on github seemed to indicate local Chrome data might get…
Background The last few days Amazon has been having a "fire sale" selling their fire phone for 199USD unlocked and off contract, plus a year of Amazon prime (~99USD). Given the hardware this was a little to good for me to pass up. Arguably the biggest problem with the Fire Phone (and all Amazon's devices) is that it doesn't have access to Google's Play Store, and the OS and bootloader are locked…
This tutorial builds the same Chrome extension popup as my Chrome Extension Content Script Stylesheet Isolation tutorial, but uses the chromeps pubsub module to make things easier. For more detailed information, I highly recommend looking through that tutorial. You can get all the code for this tutorial from https://github.com/anderspitman/chrome-extension-pubsub-example Background Info When…
UPDATE 2014-08-30 : For a way to handle message passing using the chromeps pubsub module, see this post . Background Info When writing Chrome extensions, if you want to inject HTML and CSS into pages the user is visiting, you use what's called a content script . One reason you might want to do this would be to build a custom popup that activates on certain pages. One of the biggest problems people…
The purpose of this post is to get Asterisk users up and running with the Asterisk 12 ARI with Python as quickly as possible. I'm assuming: You know what the ARI is You know at least the basics of using Asterisk You have Asterisk 12 installed You have Python with pip installed (preferably inside a virtualenv) I followed this other tutorial closely, particularly the implementation of the websocket…
I recently decided to start hacking on the excellent IPython project. I wanted to have full control over the versions of all the software involved, which meant compiling Python from source. This guide is intended to take one through the entire process of setting up a custom Python build with virtualenv in the least number of steps possible, with the final goal of building a virtualenv specifically…