Skip to content

Instantly share code, notes, and snippets.

View PeterPanSwift's full-sized avatar

潘世穎 PeterPanSwift

View GitHub Profile
<!DOCTYPE html>
<html lang="zh-Hant">
<head>
<meta charset="utf-8">
<title>The Little Prince's Starry Library</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Zhi+Mang+Xing&family=Quicksand:wght@400;600&display=swap" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/styles/github-dark.min.css">
#!/usr/bin/env python3
"""Collect Medium export post metadata into JSON for the Little Prince UI."""
from __future__ import annotations
import json
from datetime import datetime
from pathlib import Path
from typing import List, Dict, Any
#!/usr/bin/env python3
"""Collect Medium export post titles and publication dates into JSON."""
from __future__ import annotations
import json
from datetime import datetime
from pathlib import Path
from typing import List, Dict, Any
import SwiftUI
private func point(_ x: CGFloat, _ y: CGFloat, in rect: CGRect, mirrored: Bool = false) -> CGPoint {
let resolvedX = mirrored ? 1 - x : x
return CGPoint(x: rect.minX + resolvedX * rect.width, y: rect.minY + y * rect.height)
}
struct LittlePrinceView: View {
private let outerCloak = Color(red: 0.05, green: 0.58, blue: 0.71)
private let innerCloak = Color(red: 0.68, green: 0.09, blue: 0.31)

PeterPanSwift: 將圖片 /Users/shih-yingpan/Desktop/b612.png 設為 iOS 的 App Icon

GitHub Copilot: To set your PNG as the App Icon in this Xcode project, I’ll update the asset catalog by generating the proper app icon entries and adding your image file into Assets.xcassets/AppIcon.appiconset, wiring it in Contents.json.

Read file:///Users/shih-yingpan/Desktop/Demo/Assets.xcassets/AppIcon.appiconset

Read file:///Users/shih-yingpan/Desktop/Demo/Assets.xcassets

Read file:///Users/shih-yingpan/Desktop/Demo/Demo/Assets.xcassets

PeterPanSwift: 將圖片 /Users/shih-yingpan/Desktop/b612.png 設為 iOS 的 App Icon

GitHub Copilot: I'll first check your pubspec.yaml to see if flutter_launcher_icons is already configured, then copy your image into the project and wire up the icon generator for iOS.

Created 4 todos

Read

Ran terminal command: mkdir -p "/Users/shih-yingpan/Desktop/swift_b612_neverland/assets"

//
// ContentView.swift
// Demo
//
// Created by SHIH-YING PAN on 2025/9/14.
//
import SwiftUI
struct ContentView: View {
{
"name": "羅浮敦群島 (Lofoten Islands)",
"country": "挪威",
"coordinates": { "lat": 68.333, "lng": 14.666 },
"overview": "羅浮敦群島位於挪威北極圈內,以峭壁、漁村、峽灣與午夜太陽/極光聞名。島與島之間以E10公路串聯,風景壯闊。",
"images": {
"overview": {
"title": "Reine, Lofoten (2009)",
"url": "https://upload.wikimedia.org/wikipedia/commons/a/a6/Reine_Lofoten_2009.JPG",
"source_page": "https://en.wikipedia.org/wiki/File:Reine_Lofoten_2009.JPG",
@PeterPanSwift
PeterPanSwift / iceland.json
Created August 22, 2025 06:04
Iceland overview (JSON)
{
"country": "Iceland",
"native_name": "Ísland",
"official_name": "Iceland",
"capital": "Reykjavík",
"iso": {
"alpha2": "IS",
"alpha3": "ISL",
"numeric": "352"
},
@PeterPanSwift
PeterPanSwift / iceland.json
Created August 22, 2025 06:02
Iceland overview (JSON)
{
"country": "Iceland",
"native_name": "Ísland",
"official_name": "Iceland",
"capital": "Reykjavík",
"iso": {"alpha2": "IS", "alpha3": "ISL", "numeric": "352"},
"coordinates": {"lat": 64.9631, "lng": -19.0208},
"region": "Europe",
"subregion": "Northern Europe",
"area_km2": 103000,