Filter by source
All sources GoCardless 6194 PubNub: 2474 Vercel 1664 Ariya Hidayat 849 Serverless 849 Jake Trent 816 Drew DeVault 784 Nic Raboy 734 SitePoint 629 Neon 504 Supabase 435 Shopify 432 Soundcloud 409 Databricks 396 Real Python 394 Johannes Brodwall 378 Jeremy Kun 327 Laravel 296 PostHog 294 Twilio 260 Graham King 257 MapTiler 257 Carlos Becker 252 Scott Johnson 250 Cloudflare 244 Lea Verou 244 Matt Aimonetti 231 Atomic Object 218 Andrew Bancroft 214 Nvidia 212 Stanko Tadić 189 Lerner Consulting 188 Stack Overflow 183 Freek Van der Herten 182 The Daily WTF 168 Raymond Chen 165 Trivago 159 GitHub Old 155 Discord 140 Dan Luu 137 WyeWorks 134 Swizec Teller 133 Una Kravets 132 Auth0 129 Codrops 126 OCTO Technology 123 Reginald Braithwaite 121 Android 119 Jane Street 119 Hostinger 118 Radek Pazdera 118 Warp 114 AWS 110 Antirez 110 Thoughtbot 105 Cerner 103 AdRoll 102 Changelog 101 Jake Wharton 101 Nelson Elhage 98 Martin Fowler 96 dbt Labs 95 Ilija Eftimov 94 Marek Majkowski 94 Docker 87 .NET 86 Finn.no 86 Nick Desaulniers 86 Hayden James 84 Marcelo Rinesi 84 Nordic APIs 82 Timescale 82 Toptal 82 Luciano Mammino 80 Sentry 79 Wingify 78 Jessie Frazelle 77 Monica Dinculescu 77 Matt Warren 76 Drivy 75 Jan Lelis 75 T.J. Maher 74 Paweł Chudzik 73 Kotlin 69 Ebay 68 Mykhailo Kozik 68 Axel Rauschmayer 64 Mozilla Release 64 Evil Martians 63 Confluent 62 Tania Rascia 60 0xADADA 59 Jake Yesbeck 59 Khan Academy 59 Tailscale 59 Dean Hume 57 RoseHosting 56 SurveyMonkey 53 jOOQ 53 Sam Saffron 51 Facebook AI Research 48 Monstermuffin 48 Huon Wilson 45 Philip Walton 45 Dennis Felsing 44 HackerEarth 44 Rust 44 The Pragmatic Engineer 44 Fly.io 43 Josh Sherman 42 Stripe 42 Gleb Bahmutov 41 Robin Ward 41 Philipp Oppermann 40 Armin Ronacher 36 Daniel Doubrovkine (dB.) 36 Alex Russell 35 Grab 35 Addy Osmani 34 Airbnb 34 Pinterest 34 Tumblr 33 8th Light 32 Joe Nelson 32 Brandwatch 31 Palantir 31 Bartlomiej Filipek 30 Domenico Luciani 30 Lazarus Lazaridis 30 Pamela Fox 30 Evan Miller 29 IPFS 29 Vanilla Java 29 Evan Hahn 28 Jonathan Snook 28 PagerDuty 28 Ruslan Spivak 28 Dereuromark 27 Okta 27 Petr Mitrichev 27 Red 27 GitHub 26 Julia Evans 26 Mozilla Hacks 26 Bad Concurrency 25 CSC - IT Center For Science - Cloud Team 25 GameChanger 25 Guido van Rossum 25 Jay Fields 25 Jeff Preshing 25 Life Plus Linux 25 Mark Seaborn 25 Oona Räisänen 25 Srinivas Tamada 25 Stephen Colebourne 25 Steve Yegge 25 Criteo 24 Eli Bendersky 24 Kogan.com 24 Squarespace 24 Dropbox 23 Crystal 22 Elegant Code 22 Babbel 21 Blundell's Android Tutorials 21 Gusto 21 HomeAway 21 Netflix 21 Dave Cheney 20 David Walsh 20 Erlang Solutions 20 Guardian 20 Justin Weiss 20 Michael Herman 20 Miguel Quinones 20 Mike Ash 20 Ole Begemann 20 Paul Irish 20 Robert C. Martin 20 Stefan Parker 20 Target 20 Wilfred Hughes 20 Yahoo 20 Instacart 19 Jeff Atwood 19 Spotify 19 Thumbtack 19 Aaron Patterson 18 Arkency 18 Nikola Brežnjak 18 The Coded Self 18 Chris Wellons 17 Jerry Gamblin 17 Matthew Green 17 Wealthfront 17 Filippo Valsorda 16 Medium 16 Postmark 16 RocksDB 16 Stack Abuse 16 Yegor Bugayenko 16 Zach Holman 16 Amit Merchant 15 Bigcommerce 15 Blender 15 Edward Faulkner 15 High Scalability 15 Housing.com 15 Hypriot 15 Jacopo Tarantino 15 John Wittenauer 15 Lambda the Ultimate 15 Localytics 15 Microsoft Python 15 Robin Wilson 15 Slack 15 Advanced Web Machinery 14 Grofers 14 Helpshift 14 HubSpot 14 OLX 14 REA Group 14 Rob Allen 14 Vlad Mihalcea 14 Bootstrap.com 13 Feedzai 13 Grafana 13 Indeed 13 Lyft 13 Michael Crump 13 Nextdoor 13 Scott Hanselman 13 Strava 13 Bazaarvoice 12 Canva 12 Henrik Warne 12 Jon Skeet 12 Mary Rose Cook 12 Nicolas Liochon 12 Novoda 12 Steve Bellovin 12 Abu Ashraf Masnun 11 Badoo 11 Deliveroo 11 Eric Lippert 11 Haptik 11 Hashrocket 11 JobTeaser 11 Kevin Burke 11 Marco Pivetta 11 New York Times 11 OpenDNS 11 Paypal 11 Ramon Fried 11 RisingStack 11 Small Improvements 11 VNGRS 11 Vinted 11 Zendesk 11 Alan Storm 10 Appnexus 10 Artsy 10 BBC 10 Benchling 10 Bill the Lizard 10 Bohops 10 Brendan Eich 10 Brendan Gregg 10 Brujo Benavides 10 Clever 10 Curalate 10 Daily JS 10 Daily Tech Video 10 Daniel Schmidt 10 Dot Dev (.dev) 10 Dragan Djuric 10 Eddie Smith 10 Eric Elliot 10 Erik Runyon 10 Evan Jones 10 Federico Cargnelutti 10 Findmypast 10 Flickr 10 Freeletics 10 GoSquared 10 Groupon 10 Harry's 10 Henrik Lau Eriksson 10 High Scalability 10 Hootsuite 10 Idontgetoutmuch's Weblog 10 Itamar Turner-Trauring 10 Jamis Buck 10 Jesal Gadhia 10 Joel Spolsky 10 Juan Treminio 10 Junior Grossi 10 Kirill Shevchenko 10 Larry Land 10 Matt Cutts 10 Matt Might 10 Mesosphere 10 Miro Cupak 10 Miro 10 NSHipster 10 Nick Craver 10 Ofer Zelig 10 Panorama Education 10 Pat Shaughnessy 10 Piotr Pasich 10 Pony Foo 10 Postman 10 ReactJS News 10 Regular Geek 10 Remind 10 RetailMeNot 10 Riot Games 10 Schakko 10 Skyscanner 10 Stitch Fix 10 Teamwork 10 Tikhon Jelvis 10 Tinder 10 Transferwise 10 TrueCar 10 Undocumented Matlab 10 Universe 10 UpGrad 10 VTS 10 Wojtek Gawroński 10 XING 10 Yammer 10 Yifan Lu 10 Zolmeister 10 eFounders 10 Josh Haberman 9 Nate Berkopec 9 Wemake.services 9 Mike Fogus 8 Ian Hummel 7 Ilya Grigorik 6 K. Harrison 6 Sensible 6 James Long 5 Thomas Young 5 Edgar Aroutiounian 4 Avenue Code 3 Bandcamp 3 James Hague 3 Raymond Hettinger 3 Algolia Anders Aarvik Ariejan de Vroom Asana Atlassian Bjørn Johansen Blake Erickson Bryan Cantrill Capgemini Chen Hui Jing Chien Tran Cloudera Cloudsmith CockroachDB Code with style! CodeName One Codelitt Codeship Commercetools Credit Karma Crowdfire Deezer DoorDash Dragan Gaic Engine Yard Entelo Envato Envoy Eventbrite Federico Tomassetti Figma GIPHY Galois Go GoDaddy Guilherme Rodrigues Hashnode Heroku Honeybadger Honeycomb IMVU Ievgen Kuzminov Instagram Jobandtalent John Resig Jonathan Dekhtiar Just Eat Kinvolk Kolosek Kyle Kingsbury LINE Linear LiveRamp Liveblocks Made Tech Marc Plano-Lesay Microsoft Edge Moove-it Mozilla Automation Team NPR Apps Nicolai Parlog (CodeFX) Oursky Oxide Computer Paul Lewis Peter Norvig Peter Steinberger Peteris Krumins PicCollage PlanetScale Prezi PullReview Rachel Kroll Radim Řehůřek Ray Wenderlich React Native Render Retool Schibsted Tech Polska Sharethis Sketch Sky Betting & Gaming Soshace Speedledger Sqreen Square Stackshare Swift Swiggy Takipi Temporal Turso Vena Solutions VersionEye Wayfair William Kennedy Zed Zendesk(old) theScore
816 articles Visit blog →

271. Set Node.js Version for Neovim and Language Servers (jaketrent.com)

Here's a method for pegging a stable node.js version for nvim and language servers.What's a language serverNeovim has language server protocol (LSP) support built in. But it doesn't have the language servers themselves. And language servers are installed in all sorts of sundry ways.Some language ser...

272. Nits in Merge Request Feedback (jaketrent.com)

Should I give nit comments in merge requests?What is a "nit"?In the context of a merge request, a "nit" is a type of comment. It is always a small thing. It probably doesn't matter. It's often stylistic.Often it's given with a good attitude of helpfulness. Occasionaly it's given because someone has ...

273. Deploy Astro to Gitlab Pages (jaketrent.com)

Here are some instructions on how to deploy an astro.build site to Gitlab pages.Gitlab pages deployment is controlleed via your .gitlab-ci.yml file. Everything is in there. The file contents might look like this:image: node:19.1.0 pages: script: - npm ci - npm run build - rm -rf public - mv dist pub...

274. Favorite Vim Tricks (jaketrent.com)

These are some of my favorite or most easily forgotten vim tricksOf course, there is a fantastic educational newsletter, VimTricks. You should subscribe and get all the tricks they have. These are some I've learned from them and elsewhere that I want to remember and highlight for myself.Get filetype...

275. Generate a Password (jaketrent.com)

Here are some ways to generate a secure password.Pre-installeduuidgen comes with linux-utils. Probably pre-installed. If a uuid will do it, bam:uuidgen a08db6c6-66bd-4cd1-a6d0-a7d4c72d0e90Nice for use in portable bash scripts.pwgensudo apt install pwgenpwgen -ycns 64 1-y - include a symbol-c - inclu...

276. Default Function Params in Python (jaketrent.com)

This is how to write bug-free default parameters for your python functions.Dynamic DefaultsA dynamic default is one that changes on each function invocation. An example would be a datetime parameter that is set to the current datetime if not explicit datetime is sent as an argument.Not in Function S...

277. A World Where Other People Think (jaketrent.com)

Others are solving their problems. Solve your own.Parallel ProcessingWe live in a world where other people are thinking. All the time. Oh, and talking. Hot takes from all tech corners. Find an outlet to fit you on the Internet. There are many distractions. Social media feeds never stop.Things seem f...

278. Type TypeScript React Functions (jaketrent.com)

These are the best typings for React function components in TypeScript.React.FC no moreReact.FC was a nice shortcut. But it seems to actually create trouble down the line -- eg, in generics, defaultProps and return types.Simple and makes senseInstead, do what's simple and makes sense. Just type your...

279. Connect psql to Kubernetes Postgres (jaketrent.com)

Here are commands to connect local psql to Postgres in Kubernetes.Find Postgres PodsFirst, find all your kubernetes pods:kubectl get podsWhich will output something like:NAME READY STATUS RESTARTS AGE ... noice-postgresql-0 1/1 Running 0 19h ...Then determine which one is the Postgres pod. Describin...

280. Test an Intersection Observer in React (jaketrent.com)

Here is how I have tested an IntersectionObserver in Reactland.A React Hook for ObserveringLet's say that I wanted to set up an IntersectionObserver using a React hook. Reasonable enough. This tracks whether something has been seen. If it's seen, and only the first time, a callback is executed:impor...

281. Test a Middleware with a Header in FastAPI (jaketrent.com)

This is a method to test a FastAPI middleware that reads an HTTP header.The MiddlewareLet's make a little FastAPI app. It has one endpoint. The middleware on that endpoint will test for the existence of x_my_header. If it's not set, an exception will be thrown.from fastapi import Depends, FastAPI, H...

282. Dictionary in the Shell (jaketrent.com)

Here's an easy tool to lookup definitions in a dictionary in your terminal.Dict ProtocolYou'll need the Internet, because it's not a local dictionary. And you'll need curl, or wget or something to make the network request.Then choose a word to look up. Here, mine is "entail". Then run:curl 'dict://d...

283. Premature Performance Optimization (jaketrent.com)

Here are some of my thoughts on how to not worry about performance.Don't Worry, Be HappySufficient unto the day is the evil thereof.In other words, there are enough things to worry about. Attend to what is needful. Don't over-react to what may be in the future.Art of CodingThere will be certain laws...

284. Jest Unexpected Token in TypeScript (jaketrent.com)

This is one method of resolving unexpected tokens in TypeScript.The ErrorI ran into this recently when upgrading some libraries, including uuid, specifically. I ran tests, and they failed. The error is big, but it's pretty helpful and descriptive. Here was the error:Error ● Test suite failed to run ...

285. Import SQL into Fly.io Postgres (jaketrent.com)

This is one way to migrate data into fly.io Postgres database.Create a clusterFly.io gives you a handy cli for running commands on its platform. The pg or postgres subcommand will give you access to postgres database actions. If not done already, first, create the Postgres instance:fly pg createThis...

286. Git Reset Single File to Origin Version (jaketrent.com)

Sometimes you have a file in your local git clone that you want to simply reset to whatever is at origin.You might want to do this if the origin copy is pristine and your local copy is messed up. Even if you did a git reset --hard, it would not be fixed, because even your committed version at HEAD i...

287. Freeze Poetry Dependencies into requirements.txt (jaketrent.com)

Freeze your poetry requirements into a requirements.txt file.It's poetrypip makes it easy. It's like poetry.We want poetry to be as poetic as pip, but it's not.Easy as pippip freeze > requirements.txtThanksgiving pie-level easy.PoetryWell what about poetry. If you're using it, you've set up your pro...

288. Convert HEIC to JPG on Pop!_OS (jaketrent.com)

Here's a tool that will let you convert .heic images to .jpg images on Pop!_OS or Ubuntu derivatives.Install ToolsYou'll need a few dependencies. Some you can get from apt repos:sudo apt install libheif-examplesAnd the other from git:git clone https://github.com/nitinkamra1992/heic2jpgRun ItNow run ...

289. Auto Resolve Git Rebase, Take Incoming Change (jaketrent.com)

It's a nightmare that clears up quickly. You rebase, and it produces a merge conflict. Instead of looking at the file contents, you decide to simply take the incoming changes.The ScenarioYou're on your feature branch:git checkout myfeatureYou try to merge the main branch:git rebase mainThis produces...

290. Remove Key from Immutable Dict in Python (jaketrent.com)

Here's a way to remove an attribute by key from an immutable dict in Python.Mutable DeleteThe usual answer is to just delete the attribute:>>> obj = { "a": 1, "b": 2 } >>> del obj["a"] >>> obj {'b': 2}But that modifies the obj dict. Modifications to shared state allow for a class of bugs that we can...

291. Write Nested Loop as List Comprehension (jaketrent.com)

Here's how to write the nested loop as a list comprehension.WhyA list comprehension is nice because it's a single expression that returns a value. This better-supports immutable data structures. If one was to use for loops, multiple nested statements would be required and the modification of an exte...

292. Transfer Vars Between Pydantic Instances (jaketrent.com)

Easily transfer attribute values from one pydantic model instance to another instance.The ModelLet's say that you have a model and one instance:>>> from pydantic import BaseModel >>> class A(BaseModel): ... field: str ... >>> one = A(field="one") >>> one A(field='one')The Tedious CopyWhen you wanted...

293. Network Manager in the Terminal on i3 (jaketrent.com)

If you're in i3, you'll likely want a terminal-based network manager to connect to a network.InstallYou'll want a tool called nmcli, or network manager cli. It's likely already installed. If not, install:# pop!_os sudo apt install nmcli # or, arch sudo pacman -S nmcliSee DevicesTo see the network de...

294. Loop Through TypeScript Union Type (jaketrent.com)

Here's a method to loop through the values in a union of literals in TypeScript.Union TypeA Union type in TypeScript creates an "OR" relationship between other types. Here is a general union type:type AlphaNumeric = string | numberThese are two general types. We can't loop through these, because the...

295. Cache Bust a Docker Build (jaketrent.com)

Cache bust when you want to ensure a Docker image is built fresh. Docker is nice to cache stuff for you, but sometimes you know better.Headless CMS ScenariosFor instance, let's say you have a headless CMS that will provide data to a static site at build time. You build the site in a Docker image.You...

296. Find Node IP Inside Kubernetes (jaketrent.com)

Your service runs in a Kubernetes cluster. Find and address it.Find the IP of the NodeThere is a node in the cluster. To find the IP of that node, run:$ kubectl get nodes --namespace default -o jsonpath="{.items[0].status.addresses[0].address}" 192.168.64.7%Find the Port of Your AppYour app is runni...

297. Allow Only Keys of Interface in TypeScript (jaketrent.com)

In TypeScript, you can create an object with any keys or allow only certain keys.Any Keys AllowedTo use any keys, indicate that any string is a valid key:type TrackedValues = Record const tracked = { any: true, thing: true }Only Allow Keys from an InterfaceIf you have an interface and want to use th...

298. Pacman Reports Corrupt Packages (jaketrent.com)

Recently I did a pacman -Syu system update. The update failed, however,OutputThe output that I got back from pacman included these kinds of errors:➜ sudo pacman -Syu postgresql ... :: File /var/cache/pacman/pkg/python-pip-22.2.2-2-any.pkg.tar.zst is corrupted (invalid or corrupted package (PGP signa...

299. Pacman Installs Fail with 404 (jaketrent.com)

Recently I did a pacman -S install, and it failed. It failed for multiple, well-known packages. It should have worked.OutputThe output that I got back from pacman included these kinds of errors:➜ sudo pacman -S postgresql ... error: failed retrieving file 'postgresql-14.3-3-x86_64.pkg.tar.zst' from ...

300. Extract Password from Secrets Manager via AWS Cli (jaketrent.com)

Get the password value out of AWS Secrets Manager using the CLIAWS has everythingAWS has a manager secrets vault called Secrets Manager. You can store things like passwords in it. Why would you put your passwords in AWS? Well, usually it would be because one of your apps needs to programmatically ac...
Type to search HN and engineering blog articles
Press Escape to close  |  ↑↓ to navigate  |  Enter to open