2020-09-29T18:50:08Z Open in Tab Fullscreen

A Request to a YouTube Video Downloads the Title 14 Times and Displays it Twice

2020-09-03T17:58:14Z Open in Tab Fullscreen

Clever Curl

microblog

Anders' 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:

curl -O -C - https://example.com/dir/filename.bin

Uploading files

Basic (prefer --data-binary to --data/-d because it doesn't mess with newlines etc):

curl https://example.com/dir/filename.bin --data-binary @filename.bin

-T option will make a PUT request. Advantage over --data-binary is that it doesn't load the entire file into memory on the client.

curl https://example.com/dir/ -T filename.bin
2020-09-01T18:10:12Z Open in Tab Fullscreen

TIL About json.tool

microblog

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.

2020-05-07 Open in Tab Fullscreen

In Search of a Production-Quality JavaScript Framework

virtual dom
80/20
frameworks
javascript
2020-03-27 Open in Tab Fullscreen

Facebook has an opportunity to help curb a global pandemic

facebook
covid-19
decentralization
2020-01-28 Open in Tab Fullscreen

Get yourself off Google Analytics, in 5 minutes, for free, without self hosting

analytics
2020-01-20 Open in Tab Fullscreen

This site is now browsable with netcat/plain TCP

netcat
simplicity
2020-01-15 Open in Tab Fullscreen

I just learned about HTML redirects

html

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; URL='https://apitman.com/txt/feed'" />
</noscript>
2020-01-14 Open in Tab Fullscreen

This site is now browsable with cURL

hacker news
plain text
simplicity
2020-01-13 Open in Tab Fullscreen

Please make your products work with URLs

blog
simplicity
2020-01-06 Open in Tab Fullscreen

Untitled

microblog
quote

Services are just dynamic libraries where HTTP is the ABI

2019-10-02 Open in Tab Fullscreen

Compiling libfuse examples

microblog
libfuse
fuse
debugging
2019-09-27 Open in Tab Fullscreen

Before You Reach For That Dependency

moosedrive
dependencies
2019-09-24 Open in Tab Fullscreen

The 64 Milliseconds Manifesto

microblog
64.ms
performance

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.

2019-09-23 Open in Tab Fullscreen

Debugging iOS Safari

ios
safari
apple
javascript
debugging

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 an excellent debugging tool that was easy for me to set up:

ios-webkit-debug-proxy.

Once I got the console working it became pretty obvious that the global config I had defined wasn't being seen inside my ES modules. Neither Firefox or Chrome have this behavior. Not sure what the standard says, but I was able to fix it by passing the config in to my components, which is a better practice anyway.

2018-06-27 Open in Tab Fullscreen

Rust, React, and WebAssembly

tutorial
2018-06-26 Open in Tab Fullscreen

Make You a Static Site Generator

tutorial
2018-06-19 Open in Tab Fullscreen

Deploying a Static Rust App in a Barebones Docker Container

tutorial
2018-04-04 Open in Tab Fullscreen

Making a 100% Statically-Linked, Single-File Web App with React and Rust

tutorial
2014-12-17T17:30:55Z Open in Tab Fullscreen

Fix for Vimium that Stopped Working

tutorial

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 messed up from updates. My solution was to delete ~/.config/google-chrome (actually moved it to ~/.config/google-chrome.bak just in case). I believe this basically removes all the local data for chrome, as if you had just installed it for the first time. After starting Chrome back up and logging into my account, Vimium is working again! I'm running Ubuntu 14.04 with Chrome 38 as of this writing.

2014-12-01T22:43:09Z Open in Tab Fullscreen

How to Install the Google Play Store on Your Amazon Fire Phone

tutorial
2014-08-30T22:35:24Z Open in Tab Fullscreen

Chrome Extension PubSub

tutorial
2014-08-04T08:52:47Z Open in Tab Fullscreen

Chrome Extension Content Script Stylesheet Isolation

tutorial
2014-07-21T10:41:56Z Open in Tab Fullscreen

Asterisk ARI Quickstart Tutorial in Python

tutorial
2014-06-15T22:40:00Z Open in Tab Fullscreen

Setting up an IPython Development Environment from Source

tutorial