Skip to content

Instantly share code, notes, and snippets.

View valvoline's full-sized avatar

Costantino Pistagna valvoline

View GitHub Profile
//
// 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?
@valvoline
valvoline / SplashScrollView.swift
Created March 26, 2021 11:52
A simple Parallax Effect based paged ScrollView
//
// ContentView.swift
// Shared
//
// Created by Costantino Pistagna on 25/03/21.
//
import SwiftUI
struct ContentView: View {
//
// CustomSlider.swift
// Custom SliderView using SwiftUI
//
// Created by Costantino Pistagna on 02/07/2020.
//
import SwiftUI
struct ContentView: View {
//
// ContentView.swift
// neumorph
//
// Created by Costantino Pistagna on 28/06/2020.
//
import SwiftUI
struct ContentView: View {
//
// FakeBeacon.h
//
// Created by Costantino Pistagna on 02/05/2020.
// Copyright © 2020 Sofapps. All rights reserved.
//
#import <Foundation/Foundation.h>
@import CoreLocation;
//
// SAWKWebView.swift
//
// Created by Costantino Pistagna on 24/01/2020.
// Copyright © 2020 Sofapps. All rights reserved.
//
import UIKit
import WebKit
//
// ContentView.swift
// TestSwiftUI
//
// Created by valv0 on 05/06/2019.
// Copyright © 2019 Costantino Pistagna. All rights reserved.
//
import SwiftUI
@valvoline
valvoline / TestHEIC.swift
Created November 14, 2018 20:52
A simple HEIC vs JPEG benchmark based on https://pspdfkit.com/blog/2018/ios-heic-performance/
//
// ViewController.swift
// TestHEIC
//
// Created by Costantino Pistagna on 14/11/2018.
// Copyright © 2018 sofapps. All rights reserved.
//
import UIKit
import AVFoundation
int chk = DHT.read22(DHT22_PIN);
switch (chk)
{
case DHTLIB_OK:
client.print("{ \"temperature\":");
client.print(DHT.temperature-2);
client.print(", \"humidity\":");
client.print(DHT.humidity);
client.println("}");
break;
/*
A simple HomeBridgeHub example for HomeBridge
Author: Costantino Pistagna <costantino@sofapps.it>
*/
#include <dht.h>
#include <Bridge.h>
#include <BridgeServer.h>
#include <BridgeClient.h>