A tweet-sized debugger for visualizing your CSS layouts. Outlines every DOM element on your page a random (valid) CSS hex color.
One-line version to paste in your DevTools
Use $$
if your browser aliases it:
~ 108 byte version
require 'mechanize' | |
require 'csv' | |
require 'net/http' | |
count = 1 | |
site = "http://apps.fcc.gov" | |
last_id = 6018081653 | |
agent = Mechanize.new | |
allowed_fields = [ | |
'Proceeding Number:', |
This list of resources is all about acquring and processing aerial imagery. It's generally broken up in three ways: how to go about this in Photoshop/GIMP, using command-line tools, or in GIS software, depending what's most comfortable to you. Often these tools can be used in conjunction with each other.
#!/bin/bash | |
while [ 1=1 ]; do | |
wget seattletimes.com -O st.html | |
git commit -a -m "Registered update" | |
sleep 600 | |
done |
All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.
Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.
elem.offsetLeft
, elem.offsetTop
, elem.offsetWidth
, elem.offsetHeight
, elem.offsetParent
This Python script utilizes the GeoPy geocoding library to batch geocode a number of addresses, using various services until a pair of latitude/longitude values are returned.
Here’s how to make animations like this one. It requires intermediate Unix command-line knowledge, to install some tools and to debug if they don’t work. You’ll need these utilities:
curl
(or you can translate to wget
)convert
and montage
, part of ImageMagickffmpeg
, plus whatever codecsparallel
, for iteration that’s nicer than shell for loops or xargs
zsh
for leading 0s in numerical ranges to work