Skip to content

Instantly share code, notes, and snippets.

View arbyruns's full-sized avatar

Rob Evans arbyruns

View GitHub Profile
@Revivedaniel
Revivedaniel / Regex-URL-Validation.md
Last active February 25, 2022 18:21
A short breakdown of the Regex used for general URL Validation

Regex URL Validation

In this article we are going to talk about Regex and URL validation. We will be going over everthing from Anchors to Character Escapes and the examples are in JavaScript.

Summary

If Regex is new to you. Regex is used in many programming languages to distinguish patterns within strings. Each character in Regex is used to represent a pattern within the string being searched. Patterns are made up of normal and special characters. Normal characters like abc 123 represent themselves while special characters like /.$ have special meaning.

For example, the following code will check if a string is exactly abc.

@Harry-Harrison
Harry-Harrison / ContentView.swift
Last active December 1, 2024 17:59
Haptic Feedback Vibrations in SwiftUI
// This prints a list of buttons that on tap will fire a different type of haptic vibration
import SwiftUI
struct ContentView: View {
let generator = UINotificationFeedbackGenerator()
var body: some View {
VStack(alignment: .center, spacing: 30.0) {
Button(action: {