-
In reply to a post on waterpigs.co.uk
-
In reply to a post on waterpigs.co.uk
Made two minor speed improvements to last night.
First, I started resizing foreign avatars when mirroring them to the local server. So now repoy contexts and sparklines don’t have to load the person’s full resolution picture. This is also nicer when viewing through a feed reader like
Barnaby Walters‘s Shrewdness where my CSS is obviously not available.The larger improvement came from using the nginx header X-Accel-Redirect when sending images associated with posts. This allows images to serve directly from nginx and without passing through Python, even though they are not in the
staticfolder (and can even be protected by access controls).In the following two configurations to nginx,
internalmeans that these URLs are not accessible unless there is an internal redirect to them.aliasmeans that resources athttps://kylewm.com/internal_data/{some/path}will be served from/home/kmahan/redwind/redwind/_data/{some/path}location /internal_data { internal; alias /home/kmahan/redwind/redwind/_data; expires 30d; } location /internal_resized { internal; alias /home/kmahan/redwind/redwind/_resized; expires 30d; }
The change in my blog code was pretty trivial. Instead of calling Flask’s
send_from_directoryto proxy all those bytes through Python, I instead send back an empty response withX-Accel-Redirectheader.resp = make_response('') resp.headers['X-Accel-Redirect'] = '/internal' + sourcepath del resp.headers['Content-Type'] return resp
Removing the
Content-Typeheader means that nginx will decide what content type to send.Thanks
Matt Spitz for the super helpful post on the subject! -
In reply to a post on waterpigs.co.uk
-
In reply to a post on waterpigs.co.ukLooks good to me. Also I'm abusing Shrewdness to test my own micropub code hehe.
-
In reply to a post on waterpigs.co.uk@BarnabyWalters Yes, by bike! Check out the @bikeportland blog! bikeportland.org/2013/07/24/cit… and bikeportland.org/tag/hawthorne-… (aaron.pk/r4Xv2)
-
In reply to a post on waterpigs.co.uk
-
In reply to a post on waterpigs.co.uk
-
In reply to a post on waterpigs.co.uk
-
In reply to a post on waterpigs.co.uk
-
In reply to a post on waterpigs.co.uk
With the new facebook browser or extension! Specifically to allow facebook originated cross site scripting!
-
In reply to a post on waterpigs.co.uk
Is “puredata” an app?
-
In reply to a post on waterpigs.co.uk@barnabywalters yes, "new" as not yet in use. But these belts are fun, indeed!
-
In reply to a post on waterpigs.co.uk@BarnabyWalters The videos should be working in Firefox (will test on nightly). If not, it’s a bug. Somewhat limited by Vimeo in formats.
-
In reply to a post on waterpigs.co.uk@BarnabyWalters Yep. Or at least the spec says so. :-)
-
In reply to a post on waterpigs.co.uk@barnabywalters Thanks! I was quite nervous to hit GO on those first production mentions. Next step, hooking into twitter, I suppose!
-
In reply to a post on waterpigs.co.uk
-
In reply to a post on waterpigs.co.uk@BarnabyWalters There were a few I looked at. github.com/aaronpk/php-wa… looked good originally but I'm having mixed... aaron.pk/r4Xm1
-
In reply to a post on waterpigs.co.uk@BarnabyWalters There were a few I looked at. https://github.com/aaronpk/php-waveform-png looked good originally but I'm having mixed results with it on various audio files. I'm leaning towards using this now, https://github.com/bbcrd/audiowaveform and having it generate the raw data then reading that and generating my own SVG file instead.
-
In reply to a post on waterpigs.co.uk@BarnabyWalters There were a few I looked at. https://github.com/aaronpk/php-waveform-png looked good originally but I'm having mixed results with it on various audio files. I'm leaning towards using this now, https://github.com/bbcrd/audiowaveform and having it generate the raw data then reading that and generating my own SVG file instead.
-
In reply to a post on waterpigs.co.uk
shrewdception!

Comix Dym
Kyle Mahan
Brennan Novak
Aaron Parecki
Aaron Parecki
Justin Hileman
Christophe Sicard
Julien Genestoux
ind.ie
Emil Björklund
Alan
♨️Prismo♨️