Skip to content

Instantly share code, notes, and snippets.

View leeeboo's full-sized avatar

Albert Lee leeeboo

View GitHub Profile
@networkextension
networkextension / ActivityRing2.swift
Last active June 24, 2021 03:46 — forked from labradon/ActivityRing2.swift
Final code for part 2 of the article on recreating the Apple Watch activity rings in SwiftUI. add Timer base Animation
/// Nested activity rings
struct ActivityRings: View {
var ringGap: CGFloat = 2
@State var progressMove: Double
@State var progressExercise: Double
@State var progressStand: Double
var body: some View {
ZStack{
@networkextension
networkextension / Ring.swift
Created June 22, 2021 05:36
SwiftUI Ring Animation AppleWatch Workout
import SwiftUI
struct ContentView: View {
@State private var showRedStroke = false
@State private var showGreenStroke = false
@State private var showBlueStroke = false
var body: some View
{
ZStack {
RadialGradient (gradient: Gradient (colors: [Color.black, Color.black]),
center: .center, startRadius: 5, endRadius: 500)
@zvldz
zvldz / soft_hack.md
Last active May 23, 2024 11:34
soft_hack.md

Soft hack to open telnet

You need gateway 3(mgl03) connected to MiHome. And also ip and gateway token.

1 way (recommended)

Via XiaomiGateway3 component.

You must input in the 'Open Telnet command' field(as it is without changing anything):

{"method":"set_ip_info","params":{"ssid":"\"\"","pswd":"123123 ; passwd -d admin ; echo enable > /sys/class/tty/tty/enable; telnetd"}}
@wildrun0
wildrun0 / compile-ffmpeg.sh
Last active May 23, 2024 09:36
Compiling ffmpeg for Raspberry Pi 4 (script only works fine on RPi OS 32bit). x64 does not support mmal (see https://github.com/raspberrypi/userland/issues/688)
#!/bin/bash
# Note that there's no libdrm because this lib cause errors
sudo apt update -y && sudo apt upgrade -y
sudo apt-get -y install \
autoconf \
automake \
build-essential \
@qwfys
qwfys / 202005281327.md
Last active July 8, 2024 15:00
国内拉取google kubernetes镜像
@riverscn
riverscn / 北京联通IPTV内网组播.m3u
Created August 4, 2019 15:55
北京联通IPTV内网组播地址节目表(239.2.1.1网段)
#EXTM3U name="北京联通IPTV(RTP)”
#EXTINF:-1,CCTV-1高清(1)
rtp://239.2.1.129:8000
#EXTINF:-1,CCTV-2高清(2)
rtp://239.2.1.60:8084
#EXTINF:-1,CCTV-4高清(4)
rtp://239.2.1.105:8092
#EXTINF:-1,CCTV-7高清(7)
rtp://239.2.1.61:8104
#EXTINF:-1,CCTV-9高清(9)
@wess
wess / gist:c66382198d48238787718b9bb8e9f3d9
Created July 30, 2019 21:07
Start/End GCodes for BLTouch Ender 3
; Ender 3 Custom Start G-code
M140 S{material_bed_temperature_layer_0} ; Set Heat Bed temperature
M190 S{material_bed_temperature_layer_0} ; Wait for Heat Bed temperature
M104 S160; start warming extruder to 160
G28 ; Home all axes
G29 ; Auto bed-level (BL-Touch)
G92 E0 ; Reset Extruder
M104 S{material_print_temperature_layer_0} ; Set Extruder temperature
G1 X0.1 Y20 Z0.3 F5000.0 ; Move to start position
M109 S{material_print_temperature_layer_0} ; Wait for Extruder temperature
@goodwill
goodwill / cloud-sql-proxy.service
Last active July 16, 2024 21:46
Example Systemd file for starting cloud sql proxy at system start
[Install]
WantedBy=multi-user.target
[Unit]
Description=Google Cloud Compute Engine SQL Proxy
Requires=networking.service
After=networking.service
[Service]
Type=simple
@tupunco
tupunco / vscode-go 插件安装.md
Last active April 18, 2023 09:13
vscode-go 配置

ctrl+shift+p

  • 安装 vscode-go 插件:
> ext install Go
  • 安装 go tools:
> Go Install/Update Tools
@janlay
janlay / README.md
Last active May 11, 2024 03:22
Yet another config for Surge.app

Install

  1. Modify index.txt with your output path and proxy info
  2. Use Text Builder to build configuration for Surge: $ text-builder -index /path/to/index.txt Or run $ sh build-all to build all your index files.
  3. Import configuration via AirDrop/iTunes/Dropbox/iCloud

本人不提供任何保证和技术支持,使用者自负风险。
There are no guarantees, no any support. Use it at your own risk.