Skip to content

Instantly share code, notes, and snippets.

View marceloexc's full-sized avatar

Marcelo Mendez marceloexc

View GitHub Profile
@rebane2001
rebane2001 / glass-with-controls.html
Last active July 10, 2025 05:34
glass effect test css/svg thing (messy) - demo: https://codepen.io/rebane2001/details/OPVQXMv
<div style="position:absolute;top:-999px;left:-999px">
<svg
id="effectSvg"
width="200"
height="200"
viewBox="0 0 200 200"
xmlns="http://www.w3.org/2000/svg">
<filter id="displacementFilter4">
@jtvargas
jtvargas / MatrixEffect.swift
Created September 9, 2024 01:24
Stress Fiddle App in SwiftUI
//
// MatrixEffect.swift
//
// Created by J.T on 9/8/24.
//
import SwiftUI
import Combine
class MatrixEffectModel: ObservableObject {
@Enie
Enie / BrushedMetalDemoApp.swift
Last active March 14, 2025 03:04
Brushed Metal shader effect for SwiftUI
import SwiftUI
@main
struct BrushedMetalDemoApp: App {
var body: some Scene {
WindowGroup {
BrushedMetalView {
ContentView()
}
}
import Foundation
import SwiftUI
// MARK: - Custom Button Style
struct MobileMeButtonStyle: ButtonStyle {
// MARK: Metrics
@ScaledMetric private var cornerRadius = 12
@ScaledMetric private var horizontalLabelPadding = 12
@ScaledMetric private var verticalLabelPadding = 8
@stephancasas
stephancasas / AdvancedToolbarWindow.swift
Last active April 17, 2025 03:56
A SwiftUI-compatible window for macOS with advanced toolbar configurability.
//
// AdvancedToolbarWindow.swift
//
// Created by Stephan Casas on 3/17/23.
//
import SwiftUI;
import AppKit;
class AdvancedToolbarWindow<MainContent: View, ToolbarContent: View, TitleToolbarContent: View>: NSWindow, NSToolbarDelegate {
@Martini024
Martini024 / VideoHelper.swift
Last active June 7, 2025 03:21
SwiftUI: Rewrite iOS Photos Video Scrubber
import Foundation
import AVKit
class VideoHelper {
static func getThumbnail(from player: AVPlayer, at time: CMTime) -> CGImage? {
do {
guard let currentItem = player.currentItem else { return nil }
let asset = currentItem.asset
let imgGenerator = AVAssetImageGenerator(asset: asset)
@pongloongyeat
pongloongyeat / py-elementary.py
Last active June 25, 2025 21:56
Using Granite with Python
import gi
gi.require_version("Gtk", "3.0")
gi.require_version("Granite", "1.0")
from gi.repository import Gtk
from gi.repository import Granite
class MyWindow(Gtk.Window):
def __init__(self):