Default keyboard shortcuts for Ghostty terminal emulator. Platform-specific differences are noted where applicable.
Action | Windows/Linux | macOS |
---|---|---|
New window | Ctrl+Shift+N | Cmd+N |
Close window | Alt+F4 | Cmd+Shift+W |
import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card'; | |
import { ScrollArea } from '@/components/ui/scroll-area'; | |
import { useEffect, useState } from 'react'; | |
interface IDataObject { | |
userId: number; | |
id: string; | |
title: string; | |
body: string; | |
} |
Made this example to show how to use Next.js router for a 100% SPA (no JS server) app.
You use Next.js router like normally, but don't define getStaticProps
and such. Instead you do client-only fetching with swr
, react-query
, or similar methods.
You can generate HTML fallback for the page if there's something meaningful to show before you "know" the params. (Remember, HTML is static, so it can't respond to dynamic query. But it can be different per route.)
Don't like Next? Here's how to do the same in Gatsby.
// ==UserScript== | |
// @name Overleaf jump $ | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @match https://www.overleaf.com/project/* | |
// @grant none | |
// ==/UserScript== | |
(function() { | |
'use strict'; |
<!DOCTYPE html> | |
<head> | |
<meta charset="UTF-8"> | |
</head> | |
<body> | |
<div id="canvas"></div> | |
<button id="restart">Restart</button> | |
<script src="minesweeper.js"></script> | |
<style> | |
* { |
<mat-card> | |
<mat-card-title>Number of RSVPs created</mat-card-title> | |
<mat-card-subtitle | |
>Counted number of events created, within every 10 second | |
window</mat-card-subtitle | |
> | |
<mat-card-content> | |
<canvas | |
baseChart | |
width="600" |
KEYMAPOPTS="us us" | |
HOSTNAMEOPTS="-n alpine" | |
INTERFACESOPTS="auto lo | |
iface lo inet loopback | |
auto eth0 | |
iface eth0 inet dhcp | |
hostname alpine | |
" | |
TIMEZONEOPTS="-z UTC" |
import React from "react"; | |
import TodoForm from "./TodoForm"; | |
import Todo from "./Todo"; | |
/* | |
TodoMVC | |
1. add todo | |
2. display todos | |
3. cross off todo | |
4. show number of active todos |
function topThreeWords(text) { | |
const cleanString = text.replace(/[\.,-\/#!$%\^&\*;:{}=\-_`~()]/g,"").toLowerCase(), | |
words = cleanString.match(/\S+/g) || [], | |
frequencies = {}; | |
let word, frequency, i; | |
for( i=0; i<words.length; i++ ) { | |
if (words[i].match(/^[\\']+$/)){ | |
word = [] | |
} |