Skip to content

Instantly share code, notes, and snippets.

View Enddle's full-sized avatar

Jianhao Zheng Enddle

View GitHub Profile
@Enddle
Enddle / wind.py
Last active October 12, 2025 23:14
import sys
import time
RED, GREEN, BOLD, RESET = "\033[1;91m", "\033[1;92m", "\033[1m", "\033[0m"
wind_height_limit = 5000
wind_must_have_id = True
if __name__ == "__main__":
if len(sys.argv) > 1:
@Enddle
Enddle / code.py
Created January 23, 2022 20:52
Pimoroni Pico RGB Keypad - Custom RGB Lighting with MIDI Support
import time
import usb_midi
import adafruit_midi
from adafruit_midi.note_off import NoteOff
from adafruit_midi.note_on import NoteOn
from rgbkeypad import RGBKeypad
from random import randrange
@Enddle
Enddle / KeyboardInset.swift
Created February 3, 2020 10:11
SwiftUI add keyboard bottom inset to view
import SwiftUI
import Combine
class KeyboardInset: ObservableObject {
let notification = NotificationCenter.default
var safeAreaBottomInset = CGFloat()
@Published var bottom = CGFloat()
@Enddle
Enddle / StretchableHeader.swift
Created January 9, 2020 23:27
Stretchable header image in ScrollView with navigationBarTitle
import SwiftUI
struct StretchableHeader: View {
// total height of navigation bar and status bar
let navHeight: CGFloat = 88
// initial image frame height
let imgHeight: CGFloat = 300