Skip to content

Instantly share code, notes, and snippets.

View aeither's full-sized avatar
:octocat:
building stuff

aeither aeither

:octocat:
building stuff
  • Metaverse
View GitHub Profile
const saveToMetal = async (text, videoId) => {
const body = {
index: INDEX_ID,
text: text,
metadata: { videoId },
}
const options = {
method: 'POST',
headers: {
@aeither
aeither / hovermenuanimation.html
Created January 27, 2023 06:34
tailwind hover menu animation
<!--
Play with it: https://play.tailwindcss.com/sjRW48tX4h
Credits: https://www.youtube.com/watch?v=NUeCNvYY_x4
-->
<div class="m-0 flex h-screen w-screen items-center bg-black">
<div class="group peer relative z-20 ml-[20vw] ">
<div class="cursor-pointer p-2 text-7xl text-white transition duration-300 ease-in-out group-hover:[&:not(:hover)]:opacity-20">Home</div>
<div class="cursor-pointer p-2 text-7xl text-white transition duration-300 ease-in-out group-hover:[&:not(:hover)]:opacity-20">Features</div>
@aeither
aeither / group-hover.html
Created January 22, 2023 13:57
tailwind group hover
<!--
https://play.tailwindcss.com/hDwqVGDYqS
-->
<div class="relative flex min-h-screen justify-center overflow-hidden bg-gray-50 py-6 sm:py-12">
<div class="flex flex-col">
<div class="group relative h-96 w-96 bg-[url('https://images.unsplash.com/photo-1492633423870-43d1cd2775eb?&w=128&h=128&dpr=2&q=80')] bg-cover">
<div class="absolute flex flex-col items-center justify-center inset-16 rounded-3xl bg-zinc-400/10 p-8 shadow backdrop-blur-sm backdrop-brightness-90 transition-all duration-300 group-hover:top-6 group-hover:bottom-6">
<h3 class="absolute p-8 text-4xl opacity-100 translate-y-0 text-white transition-all duration-300 font-bold group-hover:opacity-0 group-hover:-translate-y-4">Hover</h3>
<h3 class="absolute p-8 text-md opacity-0 -translate-y-4 text-white transition-all duration-300 group-hover:opacity-100 group-hover:translate-y-0">Sint laboris reprehenderit ad aute.</h3>
</div>
<!--
Welcome to Tailwind Play, the official Tailwind CSS playground!
https://play.tailwindcss.com/kcfjqo7FaC
-->
<div class="relative flex min-h-screen flex-col items-center justify-center overflow-hidden bg-gray-50 py-6 sm:py-12">
<!-- modal trigger -->
<div>
<label for="tw-modal" class="cursor-pointer rounded bg-black px-8 py-4 text-white active:bg-slate-400">OPEN MODAL</label>
</div>
@aeither
aeither / daisytab.tsx
Created January 21, 2023 11:04
Reactive Tab with daisyUI + tailwind + clsx
import clsx from 'clsx'
export const Page: FC = ({}) => {
const [activeTab, setActiveTab] = useState(1)
return (
<>
<div className="tabs">
{['List', 'Favourite', 'Profile'].map((title, index) => (
<!-- Background -->
<div class="flex min-h-screen flex-col items-center justify-center bg-black">
<!-- Button -->
<button class="relative overflow-hidden rounded-lg px-20 py-6">
<!-- Button Body -->
<span class="absolute inset-px z-10 flex items-center justify-center rounded-lg bg-black bg-gradient-to-t from-neutral-800 text-neutral-300">Button</span>
<!-- Animated Border -->
<!-- buttons -->
<button class="h-10 rounded-md border border-black bg-black px-6 font-semibold text-white transition duration-300 hover:bg-white hover:text-black">Button</button>
<button class="flex h-10 items-center gap-2 rounded-md border border-black bg-black px-6 font-semibold text-white transition duration-300 hover:bg-white hover:text-black">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="22 12 18 12 15 21 9 3 6 12 2 12"></polyline></svg>
Button
</button>
<!-- search bar -->
<div class="relative">
@aeither
aeither / initsolanaprogram.tsx
Last active October 20, 2022 20:48
Thirdweb and Anchor Initiate Solana Program
/* Initiate Solana Program with React */
/* With Thirdweb */
const [program, setProgram] = useState<Program<Dungeon3>>();
// TypeError: Class extends value undefined is not a constructor or null with Vite. Requires Polyfills, check Metaplex examples.
const sdk = useMemo(() => {
if (wallet.connected) {
const sdk = ThirdwebSDK.fromNetwork("devnet");
sdk.wallet.connect(wallet);
@aeither
aeither / seahorseblog.py
Last active October 9, 2022 16:40
Basic Personal Blog written with Seahorse Lang
# blog
# Built with Seahorse v0.1.6
#
# On-chain, personal blog!
from seahorse.prelude import *
# This is your program's public key and it will update
# automatically when you build the project.
declare_id('1111111111111111111111111111111111111111111');
@aeither
aeither / anchor_cheatsheet.rs
Last active September 20, 2022 10:29
Solana Anchor Lang Cheatsheet
// ---------------------------------------------------------- //
// Use Anchor Prelude
use anchor_lang::prelude::*;
// - Import mods
pub mod constant;
pub mod states;
use crate::{constant::*, states::*};