Skip to content

Instantly share code, notes, and snippets.

View PeterPanSwift's full-sized avatar

潘世穎 PeterPanSwift

View GitHub Profile
{
"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,
@PeterPanSwift
PeterPanSwift / b612_prince.json
Created August 22, 2025 05:57
B612 小王子介紹 JSON
{
"title": "B-612 的小王子",
"work": "小王子",
"author": "安東尼·德·聖修伯里",
"first_publication_year": 1943,
"subject": "來自小行星 B-612 的小王子",
"summary": "小王子居住在小行星 B-612,照料三座火山與一朵玫瑰。為理解愛與責任,他離開家園,旅行至多個小行星與地球;在與國王、愛慕虛榮者、酒鬼、商人、點燈人、地理學家與狐狸等相遇過程中,反思成人世界的荒謬、孤獨與連結。狐狸教會他「馴養」的意義:用心使彼此變得獨一無二,並學會「本質是眼睛看不見的」。",
"home_asteroid": {
"name": "B-612",
"type": "小行星",
@PeterPanSwift
PeterPanSwift / b612_prince.json
Created August 22, 2025 05:56
B612 小王子介紹 JSON
{
"title": "B-612 的小王子",
"work": "小王子",
"author": "安東尼·德·聖修伯里",
"first_publication_year": 1943,
"subject": "來自小行星 B-612 的小王子",
"summary": "小王子居住在小行星 B-612,照料三座火山與一朵玫瑰。為理解愛與責任,他離開家園,旅行至多個小行星與地球;在與國王、愛慕虛榮者、酒鬼、商人、點燈人、地理學家與狐狸等相遇過程中,反思成人世界的荒謬、孤獨與連結。狐狸教會他「馴養」的意義:用心使彼此變得獨一無二,並學會「本質是眼睛看不見的」。",
"home_asteroid": {
"name": "B-612",
"type": "小行星",
package com.example.myapplication
import android.os.Bundle
import androidx.activity.ComponentActivity
import androidx.activity.compose.setContent
import androidx.activity.enableEdgeToEdge
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.padding
import androidx.compose.material3.FloatingActionButton
import androidx.compose.material3.Scaffold
import 'package:flutter/material.dart';
void main() => runApp(const IcelandApp());
class IcelandApp extends StatelessWidget {
const IcelandApp({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
import SwiftUI
struct BunnyAnimatedView: View {
// 動畫狀態
@State private var headTiltLeft = false // 搖頭開關
@State private var earBounce = false // 耳朵彈跳
@State private var isBlink = false // 眨眼狀態
var body: some View {
ZStack {
import SwiftUI
struct BunnyView: View {
var body: some View {
ZStack {
// MARK: - 背景小氣氛
LinearGradient(colors: [.mint.opacity(0.3), .white],
startPoint: .top, endPoint: .bottom)
.ignoresSafeArea()
package com.example.myapplication
import android.os.Bundle
import androidx.activity.ComponentActivity
import androidx.activity.compose.setContent
import androidx.activity.enableEdgeToEdge
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.padding
import androidx.compose.material.icons.Icons