Skip to content

Instantly share code, notes, and snippets.

View huynguyencong's full-sized avatar

Huy Nguyen huynguyencong

  • Ho Chi Minh City, Vietnam
View GitHub Profile
@mvarie
mvarie / WhereAmIRunning.swift
Last active September 16, 2020 10:33
Detects whether we're running in a Simulator, TestFlight Beta or App Store build
//
// WhereAmIRunning.swift
// https://gist.github.com/mvarie/63455babc2d0480858da
//
// ### Detects whether we're running in a Simulator, TestFlight Beta or App Store build ###
//
// Based on https://github.com/bitstadium/HockeySDK-iOS/blob/develop/Classes/BITHockeyHelper.m
// Inspired by http://stackoverflow.com/questions/18282326/how-can-i-detect-if-the-currently-running-app-was-installed-from-the-app-store
// Created by marcantonio on 04/11/15.
//
@mecid
mecid / Calendar.swift
Last active October 21, 2024 00:38
SwiftUI Calendar view using LazyVGrid
import SwiftUI
extension Calendar {
func generateDates(
inside interval: DateInterval,
matching components: DateComponents
) -> [Date] {
var dates: [Date] = []
dates.append(interval.start)