Skip to content

Instantly share code, notes, and snippets.

View ThasianX's full-sized avatar
🚀
Greatness is coming

Kevin ThasianX

🚀
Greatness is coming
View GitHub Profile
@rishipr
rishipr / wonderland_time_machine.py
Last active November 23, 2022 13:11
Rebase Awards Tracker for Wonderland $TIME Staking (MEMO) 🧙‍♂️
'''
🐸 : Created by @0xRishi
🧙‍♂️ : Generates CSV of MEMO (staked TIME) balances every 8 hours since first MEMO transaction + overlays all non-rebase MEMO transactions
🕐 : Used to create wonderland-apy.vercel.app (historical implied APY chart)
(🎩, 🎩) : How to
1) Input your AVAX wallet address into `personal_avax_addr`, your Snowtrace API key into `snowtrace_key`, and your Moralis API key into `moralis_key`
2) Run with `python3`
🐇 : Sample output
@bwasti
bwasti / sim.cc
Last active August 12, 2025 21:24
/*
sim.cc
Compile:
g++ sim.cc -std=c++11 -lpheval -O3 -o sim -IPokerHandEvaluator/cpp/include -LPokerHandEvaluator/cpp/build
./sim
Run: (all arguments are optional, defaults to 9 player full runouts)
./sim [number of other players 1-8] [cards on the board 3-5] [top % highlighted] [number of runouts per hand]
e.g.
@vibrazy
vibrazy / OptionSetSwiftUI.swift
Last active June 12, 2024 02:40
Using OptionSet to simplify your view state. Unify your states into 1
//
// Created by Daniel Tavares on 07/05/2021.
//
import SwiftUI
// MARK: - OptionsSet
// Blog post https://dev.to/vibrazy/easy-swiftui-view-bindings-using-optionset-and-sourcery-4edb
protocol OptionsBinding {}
@jfuellert
jfuellert / ScrollableView.swift
Last active April 24, 2025 01:55
A scrollable SwiftUI view, UIScrollView wrapper. ScrollableView lets you read and write content offsets for scrollview in SwiftUI, with and without animations.
import SwiftUI
struct ScrollableView<Content: View>: UIViewControllerRepresentable, Equatable {
// MARK: - Coordinator
final class Coordinator: NSObject, UIScrollViewDelegate {
// MARK: - Properties
private let scrollView: UIScrollView
var offset: Binding<CGPoint>
//
// BottomSheetView.swift
//
// Created by Majid Jabrayilov
// Copyright © 2019 Majid Jabrayilov. All rights reserved.
//
import SwiftUI
fileprivate enum Constants {
static let radius: CGFloat = 16
@mecid
mecid / PagerView.swift
Last active August 15, 2024 06:38
PagerView in SwiftUI
//
// PagerView.swift
//
// Created by Majid Jabrayilov on 12/5/19.
// Copyright © 2019 Majid Jabrayilov. All rights reserved.
//
import SwiftUI
struct PagerView<Content: View>: View {
let pageCount: Int
@ozalexo
ozalexo / ContentView.swift
Created October 24, 2019 04:42
SwiftUI: ScrollView pager
//
// ContentView.swift
// PaginatedScrollView
//
// Created by Aleksey Ozerov on 24.10.2019.
// Copyright © 2019 Aleksey Ozerov. All rights reserved.
//
import SwiftUI
//------------------------------------------------------------------------
// The SwiftUI Lab: Advanced SwiftUI Animations
// https://swiftui-lab.com/swiftui-animations-part1 (Animating Paths)
// https://swiftui-lab.com/swiftui-animations-part2 (GeometryEffect)
// https://swiftui-lab.com/swiftui-animations-part3 (AnimatableModifier)
//------------------------------------------------------------------------
import SwiftUI
struct ContentView: View {
@chriseidhof
chriseidhof / collectionview.swift
Last active January 31, 2024 19:00
SwiftUI Flow Layout
//
// ContentView.swift
// DeleteMe
//
// Created by Chris Eidhof on 02.02.21.
//
import SwiftUI
/*
@jstheoriginal
jstheoriginal / SearchBar.swift
Created June 20, 2019 00:42
A simple SwiftUI search bar
struct SearchBar : View {
@Binding var searchText: String
var body: some View {
HStack {
Image(systemName: "magnifyingglass").foregroundColor(.secondary)
TextField(
$searchText,
placeholder: Text("Search")) {
UIApplication.shared.keyWindow?.endEditing(true)