Skip to content

Instantly share code, notes, and snippets.

View dbrrt's full-sized avatar
🚲

David Barrat dbrrt

🚲
  • Basel, Switzerland
  • 06:45 (UTC +02:00)
View GitHub Profile
sudo inputattach --daemon -w8001 /dev/ttyS4
npx tsc --init --rootDir src --outDir dist \
--esModuleInterop --resolveJsonModule --lib es6 \
--module commonjs --allowJs true --noImplicitAny true
yarn init
sudo apt remove --purge blueberry
sudo apt install blueman
create table cc_stage(
cc_num int,
cc_mgr varchar
);
create table cc_prod(
cc_num int
cc_mgr varchar,
valid_from date,
valid_to date,
@dbrrt
dbrrt / vercel-wrapper.ts
Created March 24, 2022 22:30
Wrap a serverless event to a vercel request event
import type { VercelRequest, VercelResponse } from "@vercel/node";
export const vercelWrapper =
(handler_: Function) => async (req: VercelRequest, res: VercelResponse) => {
const { statusCode, body } = await handler_(req);
res.status(statusCode).json(JSON.parse(body));
};
@dbrrt
dbrrt / gist:0b45166ca921427cc13c398a71df2a8c
Last active March 2, 2022 22:57
Fix Logon WSL2 / Windows 10
https://github.com/microsoft/WSL/issues/5401
- "The user has not been granted the requested logon type at this computer"
Type `gpupdate /force` in a shell.
Then reboot.
The error shouldn't appear anymore.
@dbrrt
dbrrt / keybase.md
Created December 20, 2021 09:10
Keybase verify

Keybase proof

I hereby claim:

  • I am dbrrt on github.
  • I am dbrrt (https://keybase.io/dbrrt) on keybase.
  • I have a public key ASBVPUG-CDs4y49m2HcrX-4iG96JXjPdUYLYrH_GK0k1Qwo

To claim this, I am signing this object:

@dbrrt
dbrrt / AAA README.md
Created November 27, 2021 14:02 — forked from owulveryck/AAA README.md
Generateur de QR Code tous anti covid

go run . > output.png

@dbrrt
dbrrt / endeavour-keyring-update.sh
Created November 3, 2021 16:20
Update EndeavourOS keyring
wget https://mirror.alpix.eu/endeavouros/repo/endeavouros/x86_64/endeavouros-keyring-<VERSION>-any.pkg.tar.xz
sudo pacman -U endeavouros-keyring-<VERSION>-any.pkg.tar.xz
@dbrrt
dbrrt / build.js
Created September 26, 2021 15:17 — forked from adieuadieu/build.js
Using esbuild in your Serverless Framework Project
const fs = require('fs')
const cloudformationSchema = require('@serverless/utils/cloudformation-schema')
const esbuild = require('esbuild')
const yaml = require('js-yaml')
const rimraf = require('rimraf')
const SERVERLESS_YML_PATH = './serverless.yml'
const OUT_DIR = './dist'
// ref: https://esbuild.github.io/api/#simple-options