0TIL:把按键重复调到 11macOS 默认键盘重复速度对作者太慢,他用终端命令把 KeyRepeat 设为 1,让长按删除键时几乎即时连续删字。系统 UI 的最快设置对应 KeyRepeat=2,而终端命令能绕过这个上限。近几个 macOS 版本在长按字母键时弹出带重音符号的选择面板,作者把这个功能关掉了。8 天前
0皇家婚礼事件前 Twitter 广告工程师 Ryan Greenberg 回忆 2011 年春一次真实事故:销售团队把本应独占的 #NFLDraft 关键词卖给 Verizon,价格 10 万美元、午夜生效,但当时 Twitter 唯一的独占广告产品是 Promoted Trend,且当天唯一席位已卖给 SlimFast 用于 #RoyalWedding。工程团队当晚发现产品并不存在,只能绕过业务规则、直接操作生产数据库,手动创建一种从未设计过的“独占 campaign”。更糟的是,当时 users 集群的 MySQL 主从复制延迟高达 5000 秒,每次写入后需等约 90 分钟才能在读库验证。36 天前
0今日一得:用 magic-wormhole 发送文件作者介绍 CLI 工具 magic-wormhole 的用法:在一台机器上执行 wormhole send 生成短码,另一台执行 wormhole receive 加短码即可传文件。优点是 ad hoc、用完即弃、不留邮件/云盘残留,自动打包目录、短码可一次性使用且易口头传递。适合需要临时、点对点、不依赖云服务或邮件传文件的场景。43 天前
0错误用户案例:Twitter 广告后台一次严重越权 bug 的排查过程作者在 Twitter 工作期间,听同事排查一起严重安全 bug:HBO 等广告主登录后却看到别人的 campaign 数据。团队先切维护模式、加日志,在 sign-in 路径加校验,很快复现到“请求 user A 却拿到 user B”。进一步在用户服务侧加日志后发现:服务端确实请求了 A 也返回了 A,但客户端却收到了 B,于是怀疑到网络层。45 天前
0Twitter 广告上线记:消失的推文与那个被放过的 bug加入广告团队2010年春天,我收到了Twitter的工作邀请。我是Twitter的忠实用户,对能在这家公司工作感到兴奋。我接受了,甚至不知道自己会加入哪个团队。签约后,招聘人员问:“你更喜欢分析团队还是变现团队?”我刚完成了一门我非常喜欢的数据可视化课程,所以分析似乎是个不错的选择。52 天前
0今天学到了:main、figure、article 等 HTML 语义标签开发者重做个人站图片渲染时,重新学习了 main、figure、article 等 HTML 语义标签的用法和区别。59 天前
21用 git 内置功能按最后提交日期排序分支git 内置支持按最后提交日期排序分支,只需配置 branch.sort 为 committerdate,无需再写复杂脚本。还支持按 authordate、refname、upstream 等多种字段排序。66 天前
0TIL: Show the application switcher on all screensI have multiple monitors and I use the cmd + tab application switcher often.I find the current behavior of macOS pretty confusing.By default, it only shows the switcher on the most recently used scr...71 天前
0TIL: Control `less` options globally with `LESS`While researching interactive flags in less I learned about the LESS env var.This lets you set less ’s startup flags globally.For example, if you always want ANSI color escape sequences to be interp...74 天前
0Printing a Shoebox DividerWe have piles of shoes in our entryway.We have kids who help the piles grow.We have a dog whose love language is taking shoes, nibbling them, leaving them in unexpected places, and returning for mor...79 天前
0TIL: `less` lets you toggle startup flags interactivelyI love the less pager.You can use it to read, search, tail, and more.As with many versatile programs, however, the man page for less has a bazillion different options: $ man less NAME less - opposit...81 天前
0TIL: MojibakeI learned a new word today: mojibake!Some of my old blog posts have random gibberish in them like ñ or ’.I always assumed this was the result of some character encoding mismatch but I didn’t know...88 天前
0TIL: Spotlight can do math and unit conversionsYou can open macOS’s Spotlight with cmd + space.Then you can type in math like (4 + 23) * 92 and it will show you the answer.I’ve been using this feature for awhile but I just learned that it can do...92 天前
0TIL: `pkill` to stop a process by nameSometimes when I learn about a tool I think “wow, that would have been useful [when I had some problem in the past]”.That happened with pkill, which is a command you can use to stop a process accurat...95 天前
0Twitter Hall of FameA poorly understood aspect of male culture is that we express affection by curating content on the Internet to share with the people we love.It’s a bit like being a modern hunter-gatherer.So instead...98 天前
0TIL: `cmd + shift + G` to Go To FolderGUIs are great!But I’m used to typing cd, and sometimes I prefer that to clicking around to get somewhere.MacOS merges these worlds with cmd + shift + G.101 天前
0TIL: badssl.com lets you test bad certificatesWhile working on Slack’s unfurl previews I needed to test what happens when the fetcher cannot access a site.People put a lot of different URLs into Slack;some of them are going to be unfetchable fo...105 天前
0TIL: Find shared lines with `comm`diff is a well-known tool to see what lines are different between files;comm is a less-known tool to see the common lines.I found comm when I was looking for a way to identify lines that are shared ...108 天前
0Summer of Shrub 2.0Years ago I was at a coffee shop with my friend Nick.On a lark I ordered something on the menu that I had never seen before: a raspberry shrub.It was delicious!111 天前
0TIL: Reorder columns, print the last with `awk`awk is a whole programming language, but 90% of what I use it for is printing a subset of columns.This is pretty much covered by cut with two exceptions: re-ordering columns and printing the last col...113 天前
0TIL: `Number.MAX_SAFE_INTEGER` is 2**53 - 1I was filling out a form today and a friend joked, “You should put Number.MAX_SAFE_INTEGER in the budget field.” Woah!119 天前
0TIL: `Pathname` for file operationsI used Ruby extensively at Twitter and it remains one of my favorite languages, especially for tools and scripts.That said, my knowledge of production Ruby is largely from the 1.8.121 天前