Skip to content

Instantly share code, notes, and snippets.

View imapotatoes11's full-sized avatar
🔥
can't have bad ui if there is no ui

Kevin imapotatoes11

🔥
can't have bad ui if there is no ui
  • 22:41 (UTC -04:00)
View GitHub Profile
@imapotatoes11
imapotatoes11 / FourWayDraggableSlider.swift
Created September 24, 2025 18:13
four-way toggle switch in swift (click drag and you can drag to the left or right or top or bottom)
//
// FourWayDraggableSlider.swift
// kale3
//
// Created by Kevin Wang on 2025-09-24.
//
import Foundation
import SwiftUI
@imapotatoes11
imapotatoes11 / draggableSlider.swift
Created September 24, 2025 17:13
two-way toggle switch in swift (click drag and you can drag to the left or right
//
// draggableSlider.swift
// kale3
//
// Created by Kevin Wang on 2025-09-24.
//
import Foundation
import SwiftUI
@imapotatoes11
imapotatoes11 / UnlockedDraggableSlider.swift
Created September 24, 2025 15:13
two-way toggle switch in swift (click drag and you can drag to the left or right
//
// unlockedDraggableSlider.swift
// kale3
//
// Created by Kevin Wang on 2025-09-24.
//
import Foundation
//
// draggableSlider.swift
@imapotatoes11
imapotatoes11 / integrate.py
Created April 27, 2025 02:45
small file to find indefinite integrals (only gets the right answer sometimes) (some of it is generated w/ copilot)
# Combined file from integrate package
# --- Standard Library Imports ---
import math
from fractions import Fraction
from typing import (
Tuple, Union, Dict, Sequence, Optional, ClassVar, List, Set, Callable, Any, NamedTuple
)
from abc import ABC, abstractmethod
import itertools
@imapotatoes11
imapotatoes11 / Carousel.tsx
Created August 1, 2024 01:57
nextjs carousel (needs daisyui)
@imapotatoes11
imapotatoes11 / Log.java
Created September 7, 2023 19:01
java simple logging class
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import static java.lang.System.exit;
public class Log {
public static String time() {
DateTimeFormatter dtf = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
LocalDateTime now = LocalDateTime.now();
return dtf.format(now);
@imapotatoes11
imapotatoes11 / ku.java
Last active September 8, 2023 17:31
simple java utility class
import java.util.*;
import java.util.function.Consumer;
public class ku {
/**
* Prints the object to the console
* @param o The object to print
*/
public static void println(Object o){
System.out.println(o);
@imapotatoes11
imapotatoes11 / klog.py
Created July 10, 2023 00:31
Simple logging class
class bcolors:
HEADER = '\033[95m'
OKBLUE = '\033[94m'
OKCYAN = '\033[96m'
OKGREEN = '\033[92m'
WARNING = '\033[93m'
FAIL = '\033[91m'
ENDC = '\033[0m'
BOLD = '\033[1m'
UNDERLINE = '\033[4m'