This gist is an exploration of how to validate email addresses with regex as close as possible to the specification in RFC 6531.
Discover gists
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/python3 | |
# | |
# File: SMJobBlessUtil.py | |
# | |
# Contains: Tool for checking and correcting apps that use SMJobBless. | |
# | |
# Written by: DTS | |
# | |
# Copyright: Copyright (c) 2012 Apple Inc. All Rights Reserved. | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Make sure to stop Appwrite before this backup, | |
# and make sure you have enough space on the machine. | |
# After backing up, make sure there is a file in 'backups/backup-___.tar.gz'. | |
# Also please check size of this file, it should be at least 5kb, even for small instances. | |
docker run --rm \ | |
-v appwrite_appwrite-mariadb:/backup/appwrite-mariadb \ | |
-v appwrite_appwrite-redis:/backup/appwrite-redis \ | |
-v appwrite_appwrite-cache:/backup/appwrite-cache \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// CacheAsyncImage.swift | |
// | |
// Created by Costantino Pistagna on 08/02/23. | |
// | |
import SwiftUI | |
struct CacheAsyncImage<Content, Content2>: View where Content: View, Content2: View { | |
private let url: URL? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Copyright 2019 Jason Hu <awaregit at gmail.com> | |
Licensed under the Apache License, Version 2.0 (the "License"); | |
you may not use this file except in compliance with the License. | |
You may obtain a copy of the License at | |
http://www.apache.org/licenses/LICENSE-2.0 | |
Unless required by applicable law or agreed to in writing, software |
O uso de repositórios GIT tem diversos benefícios: trabalho em equipe, desenvolvimento de recursos separadamente, histórico das alterações, etc. Mas para disponibilizar todo o potencial é preciso um pouco de dedicação no momento do commit.
Não é preciso uma vasta experiência para já ter passado por situações como conflito de arquivos onde a mensagem não traz nenhuma informações relevante e é preciso inverstigar o que a outra pessoa estava desenvolvendo ou após
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Vector3 FibDisc(int i) { | |
var k = i + .5f; | |
var r = Mathf.Sqrt((k) / n); | |
var theta = Mathf.PI * (1 + Mathf.Sqrt(5)) * k; | |
var x = r * Mathf.Cos(theta) * radius; | |
var y = r * Mathf.Sin(theta) * radius; | |
return new Vector3(x, y, 0); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// these matrices are for left-handed coordinate systems, with depth mapped to [1;0] | |
// the derivation for other matrices is analogous | |
// to get a perspective matrix with reversed z, simply swap the near and far plane | |
glm::mat4 perspectiveFovReverseZLH_ZO(float fov, float width, float height, float zNear, float zFar) { | |
return glm::perspectiveFovLH_ZO(fov, width, height, zFar, zNear); | |
}; | |
// now let zFar go towards infinity | |
glm::mat4 infinitePerspectiveFovReverseZLH_ZO(float fov, float width, float height, float zNear) { |
NewerOlder