Skip to content

Instantly share code, notes, and snippets.

View dremendes's full-sized avatar
🏠
Working from home

André Mendes dremendes

🏠
Working from home
View GitHub Profile
@shawwn
shawwn / since2010.md
Created May 11, 2021 09:46
"What happened after 2010?"

This was a response to a Hacker News comment asking me what I've been up to since 2010. I'm posting it here since HN rejects it with "that comment is too long." I suppose that's fair, since this ended up being something of an autobiography.

--

What happened after 2010?

@gsusmonzon
gsusmonzon / custom-entity-not-found-exception-filter.md
Last active February 17, 2024 06:04
Make NestJs returns 404 when EntityNotFoundError exception is thrown

Make NestJs returns 404 when EntityNotFoundError exception is thrown

When using findOrFail() or findOneOrFail() from typeORM, a 500 error is returned if there is no entity (EntityNotFoundError).

To make it returns a 404, use an exception filter as described in https://docs.nestjs.com/exception-filters .

file /src/filters/entity-not-found-exception.filter.ts

@kislayverma
kislayverma / steve-yegge-platform-rant-follow-up.md
Created December 26, 2019 07:14
The one after platforms where Steve Yegge shares Amazon war stories

By Steve Yegge

Last week I accidentally posted an internal rant about service platforms to my public Google+ account (i.e. this one). It somehow went viral, which is nothing short of stupefying given that it was a massive Wall of Text. The whole thing still feels surreal.

Amazingly, nothing bad happened to me at Google. Everyone just laughed at me a lot, all the way up to the top, for having committed what must be the great-granddaddy of all Reply-All screwups in tech history.

But they also listened, which is super cool. I probably shouldn’t talk much about it, but they’re already figuring out how to deal with some of the issues I raised. I guess I shouldn’t be surprised, though. When I claimed in my internal post that “Google does everything right”, I meant it. When they’re faced with any problem at all, whether it’s technical or organizational or cultural, they set out to solve it in a first-class way.

Anyway, whenever something goes viral, skeptics start wondering if it was faked or staged. My accident

@SalahHamza
SalahHamza / install_ngrok.md
Last active June 13, 2024 09:48
How to install ngrok on linux subsystem for windows
@nicowilliams
nicowilliams / fork-is-evil-vfork-is-good-afork-would-be-better.md
Last active May 18, 2024 14:10
fork() is evil; vfork() is goodness; afork() would be better; clone() is stupid

I recently happened upon a very interesting implementation of popen() (different API, same idea) called popen-noshell using clone(2), and so I opened an issue requesting use of vfork(2) or posix_spawn() for portability. It turns out that on Linux there's an important advantage to using clone(2). I think I should capture the things I wrote there in a better place. A gist, a blog, whatever.

This is not a paper. I assume reader familiarity with fork() in particular and Unix in general, though, of course, I link to relevant wiki pages, so if the unfamiliar reader is willing to go down the rabbit hole, they should be able to come ou

@rauchg
rauchg / README.md
Last active January 6, 2024 07:19
require-from-twitter
@EduardoMRB
EduardoMRB / gulpfile.js
Last active September 10, 2015 15:12
Gulpfile with browsersync serving assets withou refresh.
var gulp = require("gulp"),
concat = require("gulp-concat"),
minify = require("gulp-minify-css"),
sass = require("gulp-sass"),
sourcemaps = require("gulp-sourcemaps"),
rename = require("gulp-rename"),
php = require("gulp-connect-php"),
gulpif = require("gulp-if"),
env = process.env.NODE_ENV || "dev";
@laughinghan
laughinghan / InterVer.md
Last active January 6, 2024 07:22
Interface Versioning - Never break backcompat, keep the API nimble

Interface Versioning (InterVer)

Never break backcompat, keep the API nimble

An extension of SemVer with a stricter (yet more realistic) backcompat guarantee, that provides more flexibility to change the API, for libraries that are packaged and downloaded (not services accessed remotely over the Internet (see Note 4)).

@EduardoMRB
EduardoMRB / post-receive
Last active August 29, 2015 14:22
PHP deploy skeleton
#!/bin/bash
set -e
# file: hooks/post-receive inside git repository.
$WORK_DIR=path/to/work/directory
$GIT_DIR=path/to/git/directory
git --work-tree=$WORK_DIR --git-dir=$GIT_DIR checkout -f