These are the current filters.
To see exactly what HTTP requests were being made, I modified the library so that betamax would record requests.
Modern browsers allow you to embed the SVG almost as-is, with just a couple of characters that need escaping – no base64 required!
If you want an array in random order, you can use the sample
filter to get a random sample of the same size as the original array.
When you make an HTTP request, you can use the If-Modified-Since
header to get a 304 Not Modified if nothing has changed since your last request.
open
command can ask questions If you pass an argument that can’t be easily identified as a file or a URL, open
will ask you what to do next. This may be a surprise if you were trying to use it in a script.
Images can have orientation specified in their EXIF metadata, which isn’t preserved when you open and save an image with Pillow.
Escaping the pipe like [[filename\|display text]]
allows you to customise the of a link in a table.
Why I use Sessions in boto3, and the Python function I use to create them.
The flags and arguments I find useful when I’m using youtube-dl.
-n
/-i
flags to avoid overwriting files with cp
and mv
errexit
and arithmetic expressions in bash tmutil addexclusion
resp.close()
to close the file opened by send_file()
-v
flag to see what rm
is deleting {% raw %}
tag to describe Liquid in Liquid If you’re trying to write about using Liquid tags in a Liquid-based site, wrapping your tags in the {% raw %}
tag will prevent them being rendered.
test -n
with command expansion {% capture %}
tag to assign complex strings to variables If you want to get a string that’s semi-complicated to construct, you can put a “mini-template” in the {% capture %}
tag to build it over multiple lines.
appendChild()
<details>
element differently depending on whether it’s open or closed cp
or mv
a file to it "do JavaScript"
<img>
that points to another file By reading the code for the pytest-random-order
plugin, I was able to write a new plugin that runs a random subset of tests.
You can use sqlite-utils on the command line to create a SQLite database from a CSV file.
The sqlite3.connect(…)
context manager will hold connections open, so you need to remember to close it manually or write your own context manager.
If you add /podcast
to a Tumblr site, you get a podcast-like RSS feed for all the external audio posts on that site.