Skip to content

Instantly share code, notes, and snippets.

View shinokada's full-sized avatar

Shinichi Okada shinokada

View GitHub Profile
@shinokada
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
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
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": "http://0n-70s.radionetz.de/0n-70s.mp3",
"url_resolved": "http://0n-70s.radionetz.de/0n-70s.mp3",
"homepage": "http://www.0nradio.com/",
"favicon": "http://www.0nradio.com/images/favicon/mstile-144x144.png",
"tags": "classic rock,rock,pop,disco,goldies,oldies,70er,1970s,70s",
@shinokada
shinokada / gist:9b84198703ed6cf6169486de6309b5a1
Created August 21, 2023 12:33
Ultimate Prompt Engineering Secret.txt
From https://twitter.com/cj_zZZz/status/1678795785650200578
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
componentLayout
Svelte Rating - Flowbite
Svelte Rating
Rating
Components
Use the rating component to show reviews and testimonials from your users using stars and scores based on multiple styles and sizes
w-64
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

Code:

@startjson
{
   "fruit":"Apple",
 "size":"Large",
<!DOCTYPE html>
<html lang="en">
<head>
<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"
const GHPATH = 'https://vite-svelte-pwa.codewithshin.com';
const APP_PREFIX = 'vite_svelte_pwa_';
const VERSION = 'version_02';
const URLS = [
`${GHPATH}/`,
`${GHPATH}/index.html`
];
const CACHE_NAME = APP_PREFIX + VERSION;
self.addEventListener('fetch', function (e) {