Skip to content

Instantly share code, notes, and snippets.

@timothyarmes
timothyarmes / 1 Explanation.md
Last active November 30, 2023 14:47
Pages privés dans Paheko

Pages privées

Il est possible de créer une zone privée sur votre site réservée aux membres avec Paheko, mais cela n'est pas évident.

Si votre backend et frontend ont le même nom de domaine (par exemple, my-assoc.paheko.cloud), vous pouvez simplement implémenter la Partie 1 décrite ci-dessous. Cela bloquera l'accès aux pages de la zone privée sauf si l'utilisateur s'est connecté au préalable.

Si vous avez votre propre nom de domaine pour votre site et que vous utilisez Paheko Cloud, la zone d'administration du site sera toujours sur paheko.cloud. Étant donné que le frontend est désormais sur un domaine différent du backend, il n'est plus possible de savoir si l'utilisateur est connecté. C'est un problème car les pages privées ne seront désormais jamais visibles. Résoudre cela demande un peu plus de travail, comme décrit dans la Partie 2.

Partie 1 - solution simple

@timothyarmes
timothyarmes / notification.swift
Created June 8, 2017 14:05 — forked from ericdke/notification.swift
Deliver an OSX notification with Swift
func showNotification() -> Void {
var notification = NSUserNotification()
notification.title = "Test from Swift"
notification.informativeText = "The body of this Swift notification"
notification.soundName = NSUserNotificationDefaultSoundName
NSUserNotificationCenter.defaultUserNotificationCenter().deliverNotification(notification)
}
//showNotification()
@timothyarmes
timothyarmes / gist:7080170
Last active March 27, 2022 03:28
An implementation of a UINavigationBar subclass for iOS7 which creates a taller navigation bar suitable for adding extra controls underneath the title.The appearance proxy is used for shifting the title and bar button items back up to their original vertical position.Note that it's easy to specify your subclass in XCode: clicking on the UINaviga…
#define kAppNavBarHeight 66.0
@implementation TATallNavigationBar
- (id)initWithCoder:(NSCoder *)aDecoder {
self = [super initWithCoder:aDecoder];
if (self) {
[self setupAppearance];
}