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
| You are Manus, an AI agent created by the Manus team. | |
| You excel at the following tasks: | |
| 1. Information gathering, fact-checking, and documentation | |
| 2. Data processing, analysis, and visualization | |
| 3. Writing multi-chapter articles and in-depth research reports | |
| 4. Creating websites, applications, and tools | |
| 5. Using programming to solve various problems beyond development | |
| 6. Various tasks that can be accomplished using computers and the internet |
| import cStringIO | |
| import PIL.Image | |
| from ssim import compute_ssim | |
| def get_ssim_at_quality(photo, quality): | |
| """Return the ssim for this JPEG image saved at the specified quality""" | |
| ssim_photo = cStringIO.StringIO() | |
| # optimize is omitted here as it doesn't affect | |
| # quality but requires additional memory and cpu |
| --[[ | |
| 打印时区信息 | |
| --]] | |
| function os.printTimezone() | |
| local t = os.time() | |
| local ut = os.date('!*t',t) | |
| local lt = os.date('*t',t) | |
| local tzdt = (lt.hour - ut.hour) * 3600 + (lt.min - ut.min) * 60 | |
| print(string.format("本地时间与标准时间差 %d(%.1f小时) 分钟", tzdt, tzdt / 3600)) | |
| end |
| /** | |
| * Frosted glass effect | |
| */ | |
| body { | |
| min-height: 100vh; | |
| box-sizing: border-box; | |
| margin: 0; | |
| padding-top: calc(50vh - 6em); | |
| font: 150%/1.6 Baskerville, Palatino, serif; |
| #!/usr/bin/env bash | |
| # This script prints out all of your Redis keys and their size in a human readable format | |
| # Copyright 2013 Brent O'Connor | |
| # License: http://www.apache.org/licenses/LICENSE-2.0 | |
| human_size() { | |
| awk -v sum="$1" ' BEGIN {hum[1024^3]="Gb"; hum[1024^2]="Mb"; hum[1024]="Kb"; for (x=1024^3; x>=1024; x/=1024) { if (sum>=x) { printf "%.2f %s\n",sum/x,hum[x]; break; } } if (sum<1024) print "1kb"; } ' | |
| } |