Skip to content

Instantly share code, notes, and snippets.

#write {
max-width: 914px;
}
body {
font-family: "Open Sans" !important;
}
.cm-s-inner {
font-family: "JetBrains Mono" !important;
@whynotavailable
whynotavailable / emacs.el
Last active February 16, 2024 03:46
emacs
(require 'package)
(cond
((string-equal system-type "windows-nt")
(progn
(setq
ispell-program-name "C:\\ProgramData\\chocolatey\\bin\\hunspell.exe"
ispell-current-dictionary "en_US"
ispell-dictionary "en_US"
ispell-hunspell-dict-paths-alist
const axios = require('axios');
async function run() {
try {
const handler = require('./calls/' + process.argv[process.argv.length - 1]).handler
await handler();
} catch (error) {
console.error(error);
}
}
npx swagger-typescript-api --no-client -p http://localhost:5183/swagger/v1/swagger.json -n model.ts
@whynotavailable
whynotavailable / index.js
Last active November 1, 2021 03:57
example.js
class Example {
flip(text) {
return [...text].reduce((previousValue, currentValue) => currentValue + previousValue, '');
}
run(text) {
return this.flip(padLeft(text))
function padLeft() {
return '000' + text;

How not to fuck up OAuth2

I've seen a number of articles posted here recently that just give terrible advice when it comes to OAuth2, so I figured I'd make this so people would dick themselves over.

The reason people do this, is because they are just writing filler nonsense content in the hopes you'll click on the website. They don't care if the content is solid because they just want you to see the ads.

As for my credentials, I work for a major fintech company with part of my duties being to help developers get set up with OAuth2 in their applications.

If you aren't a lazy fuck, just read this, and the next section on decoupling. Otherwise I've summarised the important bits later on.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.