Install Postgres:
$ brew install postgresql
Start Postgres:
Instructions: | |
Your task is to take text and generate a cloze deletion flashcard for Anki. Text to be deleted is enclosed in brackets like this: | |
This is the [text to be deleted]. | |
There can be multiple deletions. Replace each deletion with the proper cloze deletion syntax for Anki with c1, c2, c3, etc. For example: | |
Input: "This is the [text] to be [deleted]." |
Instructions: | |
Your task is to take a list of items and generate cloze deletion flashcards. There should be a separate flashcard for each list item. A "list item" is the complete line. There is one item per line. | |
The first line is a heading, followed by a newline. It is not part of the list. It may end with a colon. Do not create a cloze deletion for this. | |
Example list (one item per line): | |
*** |
This gist explains how to set up tRPC in a Next.js 13 app. For the reasons explained here, this uses the Pages Router (pages/
) instead of the App Router (app/
). (tl;dr: As of October 2023, tRPC doesn't officially support the App Router, and it's possible but difficult to make it work.)
Create a Next.js app with npx create-next-app@latest
and these settings:
What is your project named? … my-app
Next.js 13 recommends using the App Router (app/
) instead of the Pages Router (pages/
). But tRPC doesn't officially support Next.js 13 (as of October 2023).
I spent a lot of time figuring out how to make tRPC work with the App Router. I succeeded, but decided that I'd prefer to wait until tRPC adds official support. So, for now, this gist is a collection of links that are related to this issue.
Instructions for using tRPC with the Pages Router are here.
Docs:
syntax on | |
set background=dark | |
colorscheme solarized | |
" Hide gvim menus etc. | |
set guioptions-=m "menu bar | |
set guioptions-=T "toolbar | |
set guioptions-=r "scrollbar | |
" Sane copy and paste |
I use Namecheap.com as a registrar, and they resale SSL Certs from a number of other companies, including Comodo.
These are the steps I went through to set up an SSL cert.
$ uname -r # get current kernel version; don't delete this one! | |
$ dpkg --list | grep linux-image # list installed kernels | |
$ sudo apt-get purge linux-image-x.x.x.x-generic # delete unused kernels; keep at least two | |
$ sudo update-grub2 | |
$ sudo apt-get update | |
$ sudo apt-get upgrade | |
$ sudo reboot | |
https://askubuntu.com/questions/2793/how-do-i-remove-old-kernel-versions-to-clean-up-the-boot-menu | |
https://askubuntu.com/questions/828809/cant-boot-after-apt-get-update-upgrade |
import re | |
# To test regexes, use https://regex101.com/ | |
# Test if a string matches a pattern | |
string = 'News guy wept when he told us Earth was really dying' | |
regex = r'wept' | |
if re.search(regex, string): | |
print 'match' | |
else: |