Skip to content

Instantly share code, notes, and snippets.

View shinokada's full-sized avatar

Shinichi Okada shinokada

View GitHub Profile
shinokada / +server.ts
Created May 22, 2024 05:10
SvelteKit simple sitemap component
// src/routes/sitemap.xml/+server.ts
import { generateSitemap } from '$lib'
/** @type {import('./$types').RequestHandler} */
interface Page {
loc: string;
changefreq?: string;
priority?: string;
lastmod?: string;
shinokada / vim-note.txt
Last active February 28, 2024 14:10
vim notes
# vim
cw change word
dw delete word
d3w delete 3 words
dd delete line
dfa delete forward (including) a
dtu delete til u
d$ delete from the cursor to the end of the line
ctrl-u scrolling upwards
shinokada / AcademicCap.svelte
Created December 15, 2023 16:06
AcademicCap.svelte for Svelte 5
<script lang="ts">
interface CtxType {
size: string;
role?: string;
color?: string;
variation?: 'solid' | 'outline';
viewBox?: string;
interface Props {
size?: string;
shinokada / 70s.json
Created November 26, 2023 05:57
Terminal radio favorite lists.
"changeuuid": "6cddacaf-f2c1-11e8-a471-52543be04c81",
"stationuuid": "6cddaca1-f2c1-11e8-a471-52543be04c81",
"name": "- 0 N - 70s on Radio ON 70s",
"url": "",
"url_resolved": "",
"homepage": "",
"favicon": "",
"tags": "classic rock,rock,pop,disco,goldies,oldies,70er,1970s,70s",
shinokada / gist:9b84198703ed6cf6169486de6309b5a1
Created August 21, 2023 12:33
Ultimate Prompt Engineering Secret.txt
1st Step:
Give it a role. "You are Spartacus, a pro copywriter,"
2nd Step:
Define its job "Your job is to write copy for online media brands"
Third step:
Give ChatGPT the control: "Now ask me all the questions that you need to know to write a perfect copy that'd align with my brand."
layout title breadcrumb_title component_title dir description thumnailSize
Svelte Rating - Flowbite
Svelte Rating
Use the rating component to show reviews and testimonials from your users using stars and scores based on multiple styles and sizes
import type { SvelteComponent } from 'svelte';
export interface ActivityType {
title: HTMLElement | string;
date: Date | string;
src: string;
alt: string;
text?: HTMLElement | string;

How to add PlantUML to a markdown file


<!DOCTYPE html>
<html lang="en">
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Vite + Svelte + PWA</title>
<link rel="manifest" href="/assets/manifest-1a803fe8.webmanifest" />
<meta name="theme-color" content="#ffffff" />
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon" />
<link rel="icon" href="favicon.ico" type="image/x-icon" />
"name": "Vite Svelte PWA",
"short_name": "vite-svelte-pwa",
"scope": "/",
"start_url": ".",
"icons": [
"src": "/apple-touch-icon.png",
"sizes": "180x180",
"type": "image/png"