Filter by source
All sources GoCardless 6188 PubNub: 2462 Vercel 1539 Ariya Hidayat 849 Serverless 848 Jake Trent 812 Drew DeVault 783 Nic Raboy 733 Neon 479 Supabase 424 Soundcloud 409 SitePoint 406 Johannes Brodwall 378 Databricks 366 Jeremy Kun 323 PostHog 286 Real Python 286 Graham King 257 Carlos Becker 251 MapTiler 250 Scott Johnson 250 Lea Verou 242 Laravel 232 Matt Aimonetti 231 Andrew Bancroft 214 Stanko Tadić 186 Twilio 181 Atomic Object 176 Cloudflare 170 Nvidia 168 Trivago 158 Freek Van der Herten 155 Stack Overflow 145 The Daily WTF 136 Discord 134 WyeWorks 134 Dan Luu 133 Raymond Chen 133 Una Kravets 132 Swizec Teller 129 GitHub Old 128 Reginald Braithwaite 121 Radek Pazdera 118 Warp 114 Antirez 110 Codrops 110 Jane Street 105 Android 104 Cerner 103 AdRoll 102 Auth0 102 Jake Wharton 101 Changelog 100 Nelson Elhage 98 OCTO Technology 96 Ilija Eftimov 94 Marek Majkowski 94 Thoughtbot 89 AWS 88 dbt Labs 88 Finn.no 86 Nick Desaulniers 86 Hostinger 84 Hayden James 81 Luciano Mammino 79 Martin Fowler 78 Wingify 78 Marcelo Rinesi 77 Monica Dinculescu 77 Matt Warren 76 Docker 75 Drivy 75 Jan Lelis 75 Jessie Frazelle 75 Paweł Chudzik 73 Toptal 73 .NET 69 Nordic APIs 69 Lerner Consulting 68 Mykhailo Kozik 68 T.J. Maher 67 Timescale 66 Axel Rauschmayer 64 Mozilla Release 64 Ebay 62 Kotlin 62 Tania Rascia 60 0xADADA 59 Khan Academy 59 Jake Yesbeck 58 Confluent 57 Evil Martians 54 jOOQ 53 Tailscale 51 Sam Saffron 50 Sentry 49 Monstermuffin 48 RoseHosting 48 Huon Wilson 45 HackerEarth 44 Philip Walton 44 Dennis Felsing 43 SurveyMonkey 43 Fly.io 42 Robin Ward 41 Philipp Oppermann 40 Gleb Bahmutov 39 Facebook AI Research 38 The Pragmatic Engineer 38 Dean Hume 37 Rust 36 Josh Sherman 35 Alex Russell 34 Stripe 33 Joe Nelson 32 Tumblr 32 8th Light 31 Addy Osmani 31 Grab 31 Armin Ronacher 30 Domenico Luciani 30 Lazarus Lazaridis 30 Palantir 30 Pamela Fox 30 Airbnb 29 Brandwatch 29 Evan Miller 29 IPFS 29 Ruslan Spivak 28 Vanilla Java 28 Bartlomiej Filipek 27 Daniel Doubrovkine (dB.) 27 Jonathan Snook 27 Petr Mitrichev 27 Pinterest 27 Red 27 Mozilla Hacks 26 Bad Concurrency 25 CSC - IT Center For Science - Cloud Team 25 Dereuromark 25 Evan Hahn 25 GameChanger 25 Guido van Rossum 25 Jay Fields 25 Jeff Preshing 25 Julia Evans 25 Life Plus Linux 25 Mark Seaborn 25 Okta 25 Oona Räisänen 25 Srinivas Tamada 25 Stephen Colebourne 25 Steve Yegge 25 PagerDuty 24 Squarespace 24 Kogan.com 23 Criteo 22 GitHub 22 Babbel 21 Elegant Code 21 Crystal 20 Dave Cheney 20 David Walsh 20 Eli Bendersky 20 Guardian 20 HomeAway 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 Yahoo 20 Dropbox 19 Gusto 19 Netflix 19 Instacart 18 Nikola Brežnjak 18 The Coded Self 18 Aaron Patterson 17 Jeff Atwood 17 Thumbtack 17 Erlang Solutions 16 Stack Abuse 16 Wealthfront 16 Arkency 15 Bigcommerce 15 Edward Faulkner 15 Filippo Valsorda 15 High Scalability 15 Hypriot 15 Jacopo Tarantino 15 Jerry Gamblin 15 John Wittenauer 15 Lambda the Ultimate 15 Localytics 15 Matthew Green 15 Medium 15 Microsoft Python 15 Postmark 15 RocksDB 15 Slack 15 Spotify 15 Yegor Bugayenko 15 Advanced Web Machinery 14 Helpshift 14 Housing.com 14 HubSpot 14 OLX 14 REA Group 14 Robin Wilson 14 Zach Holman 14 Amit Merchant 13 Blender 13 Chris Wellons 13 Grofers 13 Indeed 13 Nextdoor 13 Rob Allen 13 Scott Hanselman 13 Henrik Warne 12 Jon Skeet 12 Mary Rose Cook 12 Nicolas Liochon 12 Novoda 12 Steve Bellovin 12 Abu Ashraf Masnun 11 Badoo 11 Bazaarvoice 11 Blundell's Android Tutorials 11 Canva 11 Feedzai 11 Haptik 11 Hashrocket 11 JobTeaser 11 Kevin Burke 11 Lyft 11 Marco Pivetta 11 Michael Crump 11 Paypal 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 Bootstrap.com 10 Brendan Eich 10 Brendan Gregg 10 Brujo Benavides 10 Clever 10 Curalate 10 Daily JS 10 Daily Tech Video 10 Daniel Schmidt 10 Deliveroo 10 Dot Dev (.dev) 10 Dragan Djuric 10 Eddie Smith 10 Eric Elliot 10 Eric Lippert 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 New York Times 10 Nick Craver 10 Ofer Zelig 10 OpenDNS 10 Panorama Education 10 Pat Shaughnessy 10 Piotr Pasich 10 Pony Foo 10 Postman 10 Ramon Fried 10 ReactJS News 10 Regular Geek 10 Remind 10 RetailMeNot 10 Riot Games 10 Schakko 10 Skyscanner 10 Stitch Fix 10 Strava 10 Teamwork 10 Tikhon Jelvis 10 Tinder 10 Transferwise 10 TrueCar 10 Undocumented Matlab 10 Universe 10 UpGrad 10 VTS 10 Vlad Mihalcea 10 Wilfred Hughes 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 Grafana 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 Shopify Sketch Sky Betting & Gaming Soshace Speedledger Sqreen Square Stackshare Swift Swiggy Takipi Temporal Turso Vena Solutions VersionEye Wayfair William Kennedy Zed Zendesk(old) theScore
812 articles Visit blog →

271. 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...

272. 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...

273. 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...

274. 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...

275. 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...

276. 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...

277. 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...

278. 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...

279. 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...

280. 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 ...

281. 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...

282. 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...

283. 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...

284. 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 ...

285. 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...

286. 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...

287. 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...

288. 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...

289. 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...

290. 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...

291. 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...

292. 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...

293. 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...

294. 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...

295. 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 ...

296. 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...

297. Fit Psql Output on the Screen (jaketrent.com)

Do you love psql but can't stand how the output wraps and doesn't fit on the screen? Here's a tip for you!CLI for Querying Postgreslpsql is a great little tool that comes with the postgres database. It allows you to connect to the database cluster from a cli and run queries.But let's say you have a ...

298. Set Default Working Directory of Pytest in PyCharm (jaketrent.com)

IDEs are cool and all, but in their magic, they can change configurations that you wanted to stay the same.pytest NormsMany pythonistas write pytests that assume the project root to be the working directory.PyCharm is making the test script that is run the working directory. And when you run a new t...

299. Adjust Screen Brightness in Arch (jaketrent.com)

In Arch, it's the little things. Hang on to them. Cherish your ability to do anything. You've earned it.Here's how to adjust your screen brightness.DocsWho doesn't need help setting up Arch? Arch saves you with some great wiki docs. There's one on many methods for adjusting screen brightness.I had n...

300. Debug FastAPI with pdb (jaketrent.com)

This is a method for debuggging FastAPI with pdb debugger.pdbpdb is a debugger built right into the python standard library. You don't need to install a library. You don't need a fancy IDE.FastAPIThis debugging method should have broad application, but here we will use it in a FastAPI app.FastAPI is...
Type to search HN and engineering blog articles
Press Escape to close  |  to navigate  |  Enter to open