Skip to content

Instantly share code, notes, and snippets.

View licx's full-sized avatar

Carlo Licciardi licx

  • Miami, FL
View GitHub Profile
@elnygren
elnygren / django_jwt_cookie.py
Last active September 24, 2023 08:13
Teach Django to use JWT tokens inside the session cookie - plays well with django-rest-framework-jwt.
@JamesMGreene
JamesMGreene / gitflow-breakdown.md
Last active May 3, 2024 12:32
`git flow` vs. `git`: A comparison of using `git flow` commands versus raw `git` commands.

Initialize

gitflow git
git flow init git init
  git commit --allow-empty -m "Initial commit"
  git checkout -b develop master

Connect to the remote repository

@andrewgleave
andrewgleave / iOSMapKitFitAnnotations.m
Last active May 17, 2024 02:07
Zooms out a MKMapView to enclose all its annotations (inc. current location)
MKMapRect zoomRect = MKMapRectNull;
for (id <MKAnnotation> annotation in mapView.annotations) {
MKMapPoint annotationPoint = MKMapPointForCoordinate(annotation.coordinate);
MKMapRect pointRect = MKMapRectMake(annotationPoint.x, annotationPoint.y, 0, 0);
if (MKMapRectIsNull(zoomRect)) {
zoomRect = pointRect;
} else {
zoomRect = MKMapRectUnion(zoomRect, pointRect);
}
}