Skip to content

Instantly share code, notes, and snippets.

View hukusuke1007's full-sized avatar
😁
Very good

shohei hukusuke1007

😁
Very good
View GitHub Profile
@hukusuke1007
hukusuke1007 / default.md
Created July 9, 2025 02:01 — forked from cablej/default.md
Cluely System prompt

<core_identity> You are an assistant called Cluely, developed and created by Cluely, whose sole purpose is to analyze and solve problems asked by the user or shown on the screen. Your responses must be specific, accurate, and actionable. </core_identity>

<general_guidelines>

  • NEVER use meta-phrases (e.g., "let me help you", "I can see that").
  • NEVER summarize unless explicitly requested.
  • NEVER provide unsolicited advice.
  • NEVER refer to "screenshot" or "image" - refer to it as "the screen" if needed.
  • ALWAYS be specific, detailed, and accurate.
@hukusuke1007
hukusuke1007 / nodejs-edge-function.ts
Created September 15, 2023 01:26
TypeScriptで書いたLambda@EdgeをビルドしてデプロイするCDKのFunction
// Reference: https://martinmueller.dev/cdk-lambda-edge-eng/
import { Construct } from 'constructs'
import * as cloudfront from 'aws-cdk-lib/aws-cloudfront'
import * as lambda from 'aws-cdk-lib/aws-lambda'
import * as fs from 'fs'
import * as path from 'path'
import { BundlingOptions } from 'aws-cdk-lib/aws-lambda-nodejs'
/// Fix: ERR_PACKAGE_PATH_NOT_EXPORTED
@hukusuke1007
hukusuke1007 / main.dart
Last active August 25, 2023 23:56
タコメーター
import 'package:flutter/material.dart';
import 'dart:math';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
Fatal Exception: java.util.ConcurrentModificationException:
at java.util.ArrayList$Itr.next(ArrayList.java:860)
at com.google.firebase.firestore.core.Query.matchesOrderBy(Query.java:14)
at com.google.firebase.firestore.core.Query.matches(Query.java:12)
at com.google.firebase.firestore.local.SQLiteRemoteDocumentCache.lambda$getDocumentsMatchingQuery$3(SQLiteRemoteDocumentCache.java)
at com.google.firebase.firestore.local.SQLiteRemoteDocumentCache.lambda$processRowInBackground$2(SQLiteRemoteDocumentCache.java:6)
at com.google.firebase.firestore.util.BackgroundQueue.lambda$execute$0(BackgroundQueue.java)
at com.google.firebase.firestore.util.ThrottledForwardingExecutor.lambda$execute$0(ThrottledForwardingExecutor.java)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
@hukusuke1007
hukusuke1007 / PermissionCheckView.swift
Last active April 21, 2021 03:43
【iOS13対応】PermissionCheckerの実装
import SwiftUI
struct PermissionCheckView: View {
let checker: PermissionChecker = PermissionCheckerImpl()
var body: some View {
VStack(spacing: 16) {
Button(action: {
checker.invoke(.notification) { (granted) in
print(granted)
}
@hukusuke1007
hukusuke1007 / PageView.swift
Last active April 15, 2021 07:37
【iOS13対応】SwiftUIのPageView
// Thanks!!
// https://gist.github.com/masamichiueta/f07fd47040b2add051afa45d73966481
import SwiftUI
import UIKit
struct PageView<Page: View>: View {
var viewControllers: [UIHostingController<Page>]
@Binding var currentPage: Int
let onChangePage: ((Int) -> Void)?
@hukusuke1007
hukusuke1007 / SampleListView.swift
Last active April 15, 2021 07:39
【iOS13対応】SwiftUIのList(上下スクロール付き)
import SwiftUI
struct SampleListView: View {
@State private var items: [String] = (0...100).map { i in "\(i)" }
@State private var bottomScroll = false
var body: some View {
ZStack {
TableView(
@hukusuke1007
hukusuke1007 / InputAccessoryView.swift
Last active April 8, 2021 01:22
【iOS13対応】SwiftUIのTextView
import UIKit
/// InputAccessoryView
/// A container for putting custom buttons on the inputAccessoryView of UITextView or UITextField.
class InputAccessoryView: UIView {
/// The height of internal toolbar
private static let ToolbarHeight: CGFloat = 44.0
/// Toolbar
@hukusuke1007
hukusuke1007 / SwitchViewSample1.swift
Last active April 1, 2021 06:29
SwiftUIの状態による画面切り替え
import SwiftUI
import Combine
extension Identifiable where Self: Hashable {
typealias ID = Self
var id: Self { self }
}
class MaintenanceObject: ObservableObject {
let fetchMaintenance = PassthroughSubject<Bool, Never>()
@hukusuke1007
hukusuke1007 / SampleModalPushView.swift
Last active April 15, 2021 07:41
SwiftUIのモーダル遷移とプッシュ遷移のサンプルコード
import SwiftUI
extension Identifiable where Self: Hashable {
typealias ID = Self
var id: Self { self }
}
struct SecondView: View {
let text: String