Skip to content

Instantly share code, notes, and snippets.

View HeavenOSK's full-sized avatar
🦌
... 🦒 ... 🐏 ... 🐕

HeavenOSK HeavenOSK

🦌
... 🦒 ... 🐏 ... 🐕
View GitHub Profile
GPT Playground
  <section>
    <details>

Option

<script setup lang="ts">
import { reactive } from "vue";
interface Counter {
count: number;
increment: () => void;
}
const counter: Counter = {
count: 0,
<script setup lang="ts">
import { useCustomDialog } from "@/hooks/useCustomDialog";
import { ref } from "vue";
const { CustomDialog, openDialog } = useCustomDialog();
const inputValue = ref("VueJS");
</script>
<template>
<div class="bg-gray-500 w-full h-screen p-4">
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
void main() {
runApp(
const App(),
);
}
class App extends StatelessWidget {
@HeavenOSK
HeavenOSK / date_cut_line.dart
Last active November 15, 2021 18:28
Cut line
import 'package:dotted_line/dotted_line.dart';
import 'package:flutter/material.dart';
import 'package:intl/intl.dart';
final sortedDateList = [
DateTime(2021, 11, 15),
DateTime(2021, 11, 15),
DateTime(2021, 11, 14),
DateTime(2021, 11, 13),
DateTime(2021, 11, 13),
extension on int {
String get label => toString();
}
void main() {
final someValue = 11;
print(someValue.label);
}
import 'dart:math';
import 'package:flutter/material.dart';
import 'package:swipable_stack/swipable_stack.dart';
const colors = [
Colors.green,
Colors.blue,
Colors.red,
Colors.limeAccent,
@HeavenOSK
HeavenOSK / ResponsiveComponent.tsx
Last active September 20, 2021 08:32
Switch components responsively with Chakra UI display props
import React, { ReactNode } from 'react'
import { BoxProps, chakra } from '@chakra-ui/react'
import { ResponsiveObject } from '@chakra-ui/styled-system/dist/types/utils/types'
type ResponsiveItems = ResponsiveObject<ReactNode>
type Props = {
items: ResponsiveItems
} & BoxProps
import type { NextPage } from 'next'
import dynamic from 'next/dynamic'
import P5 from 'p5'
import { SketchProps } from 'react-p5'
const Sketch = dynamic<SketchProps>(import('react-p5'), {
ssr: false,
})
export const SketchComponent = () => {
<loop duration="4">
<synth>
e-6 d-6 e-2-4
<code>
C9
</code>
</synth>
<hat>
pppppppp
</hat>