Skip to content

Instantly share code, notes, and snippets.

View caguilar-dev's full-sized avatar

Carlos Aguilar caguilar-dev

View GitHub Profile
@mikaeldui
mikaeldui / Proton VPN IPv6 Manual Setup.md
Last active March 7, 2026 15:01
Proton VPN IPv6 Manual Setup

Proton VPN IPv6 Manual Setup

Update 2026-03-07: Proton has added the IPv6 configurations mentioned below to the WireGuard config files that you can get through the web dashboard. The guide below is for historical purposes only.

Over 80% of the servers support IPv6 but only the Linux & Android apps and the browser extension support it **at the moment**.

The Linux app supports IPv6 over the VPN but still connects to the VPN server using IPv4.

It's possible to make changes to the WireGuard configs that you can get from https://account.protonvpn.com/downloads to enable IPv6.

@mariosaputra
mariosaputra / rcwebhook.js
Created March 3, 2024 08:56
RevenueCat Webhook
require("dotenv").config();
const express = require("express");
const axios = require("axios");
const app = express();
const port = 3000;
const TELEGRAM_TOKEN = process.env.TELEGRAM_BOT_TOKEN;
const CHAT_ID = process.env.TELEGRAM_CHANNEL_ID;
const TELEGRAM_API_URL = `https://api.telegram.org/bot${TELEGRAM_TOKEN}/sendMessage`;
//
// FreeFormDrawingView.swift
// PKDraw
import SwiftUI
import PencilKit
struct FreeFormDrawingView: View {
@State private var canvas = PKCanvasView()
@steventroughtonsmith
steventroughtonsmith / VTBMainViewController.swift
Created July 21, 2023 16:31
visionOS Freeform-style bottom toolbar ornament
//
// VTBMainViewController.swift
// VisionToolbar
//
// Created by Steven Troughton-Smith on 21/07/2023.
//
//
import UIKit
import SwiftUI
class Content: NSManagedObject {
// MARK: - Mappable
func mapValues(using mapper: Mapping) throws {
let mapper = try mapper.mapper(for: self, destination: CKContent.self)
mapper.map(\.objectID, \.identifier, transform: { objectID -> String in
return objectID.uriRepresentation().absoluteString
})
mapper.map(\.name, \.name)
mapper.map(\.url, \.url)
mapper.map(\.downloadURLExpiry, \.downloadURLExpiry)
//
// ContentMapper.swift
//
//
// Created by Antoine van der Lee on 09/03/2021.
//
import Foundation
import ContentKit
.toolbar {
ToolbarItemGroup {
Button(action: {}, label: {
Image(systemName: "sidebar.left")
})
Spacer()
Button(action: {}, label: {
Image(systemName: "play.fill")
})
Button(action: {}, label: {
@shaps80
shaps80 / ActivityView.md
Last active December 3, 2022 15:36
A complete SwiftUI UIActivityViewController implementation.

Moved

This is now available in a dedicated package: ActivityView

Alternatively my SwiftUI Backports now includes a more complete implementation of ShareLink that's also more performant.

@unnamedd
unnamedd / MacEditorTextView.swift
Last active January 2, 2026 10:23
[SwiftUI] MacEditorTextView - A simple and small NSTextView wrapped by SwiftUI.
/**
* MacEditorTextView
* Copyright (c) Thiago Holanda 2020-2025
* https://bsky.app/profile/tholanda.com
*
* (the twitter account is now deleted, please, do not try to reach me there)
* https://twitter.com/tholanda
*
* MIT license
@scottmatthewman
scottmatthewman / AdaptsToSoftwareKeyboard.swift
Last active April 19, 2024 12:56
An example of using Combine to automatically adapt a SwiftUI scrollable view to accommodate an iOS onscreen keyboard
import SwiftUI
import Combine
struct AdaptsToSoftwareKeyboard: ViewModifier {
@State var currentHeight: CGFloat = 0
func body(content: Content) -> some View {
content
.padding(.bottom, currentHeight)
.edgesIgnoringSafeArea(.bottom)