(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
| - name: Overprovision like the pros' | |
| hosts: all | |
| tasks: | |
| - name: Install early OOM killer and zram | |
| ansible.builtin.apt: | |
| pkg: | |
| - earlyoom | |
| - zram-tools | |
| - name: Configure early OOM killer | |
| ansible.builtin.lineinfile: |
| import { Adapter, AdapterSession, AdapterUser } from 'next-auth/adapters' | |
| import { PrismaClient } from '@prisma/client' | |
| import { PrismaClientKnownRequestError } from '@prisma/client/runtime' | |
| import { User, Session } from '@prisma/client' | |
| // PrismaAdapter customized to have more cleaner naming consistency | |
| // (From: https://github.com/nextauthjs/next-auth/blob/main/packages/adapter-prisma/src/index.ts) | |
| export function PrismaAdapter(p: PrismaClient): Adapter { | |
| const toAdapterUser = (user: User): AdapterUser => { | |
| return { |
| #!/bin/bash | |
| HDMI=HDMI1 | |
| EDP=eDP1 | |
| if xrandr | grep -q "${HDMI} disconnected"; then | |
| dmode=disconnected | |
| else | |
| dmode=connected | |
| fi |
| # i3status configuration file. | |
| # see "man i3status" for documentation. | |
| # It is important that this file is edited as UTF-8. | |
| # The following line should contain a sharp s: | |
| # ß | |
| # If the above line is not correctly displayed, fix your editor first! | |
| general { | |
| colors = yes |
| #!/bin/sh | |
| output () { | |
| led_mask=`xset q | grep LED | cut -d: -f4` | |
| caps_lock=$(( led_mask & 1)) | |
| num_lock=$(( led_mask & 2)) | |
| scroll_lock=$(( led_mask & 4)) | |
| declare -A output |
| # This file has been auto-generated by i3-config-wizard(1). | |
| # It will not be overwritten, so edit it as you like. | |
| # | |
| # Should you change your keyboard layout some time, delete | |
| # this file and re-run i3-config-wizard(1). | |
| # | |
| # i3 config file (v4) | |
| # | |
| # Please see http://i3wm.org/docs/userguide.html for a complete reference! |
| # Hello, and welcome to makefile basics. | |
| # | |
| # You will learn why `make` is so great, and why, despite its "weird" syntax, | |
| # it is actually a highly expressive, efficient, and powerful way to build | |
| # programs. | |
| # | |
| # Once you're done here, go to | |
| # http://www.gnu.org/software/make/manual/make.html | |
| # to learn SOOOO much more. |
| # Be sure to save your config files. Optional but I do: | |
| sudo cp /etc/postgresql/9.3/main/postgresql.conf ~ | |
| sudo cp /etc/postgresql/9.3/main/pg_hba.conf ~ | |
| # Package repo (for apt-get) | |
| wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add - | |
| sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt/ precise-pgdg main" >> /etc/apt/sources.list.d/postgresql.list' | |
| # Also probably optional but I like to update sources and upgrade | |
| sudo apt-get update |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.