Skip to content

Instantly share code, notes, and snippets.

View softlion's full-sized avatar

ZeBen softlion

View GitHub Profile
VincentH-Net /
Last active March 30, 2024 17:49
Generate OpenApi.json on build from ASP.NET 8 Minimal API

To generate OpenApi.json on build from an ASP.NET 8 Minimal API, follow these steps:

  1. In Visual Studio for Windows 17.7.0 or later, create a new ASP.NET Core API project

  2. Follow these instructions to install Swashbuckle.AspNetCore.Cli as a local dotnet tool in your project

  3. Add these NuGet packages (or later versions) to the project:

  	<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="8.0.0-preview.4.23260.4" />
snowzurfer / 3DPointsFromDepth.swift
Last active March 24, 2024 05:52
3D world points from ARKit depth
import ARKit
import SceneKit
let horizontalPoints = 256 / 2
let verticalPoints = 192 / 2
var depthNodes = [SCNNode]()
var parentDebugNodes = SCNNode()
var sceneView: ARSCNView!
// Somewhere during setup
zacwest / ios-font-sizes.swift
Last active May 31, 2024 03:07
iOS default font sizes - also available on
let styles: [UIFont.TextStyle] = [
// iOS 17
.extraLargeTitle, .extraLargeTitle2,
// iOS 11
// iOS 9
.title1, .title2, .title3, .callout,
// iOS 7
.headline, .subheadline, .body, .footnote, .caption1, .caption2,
lopspower /
Last active May 6, 2024 07:47
Material Animations

Material Animations

Android Arsenal

[Android Transition Framework][transition-framework] can be used for three main things:

  1. Animate activity layout content when transitioning from one activity to another.
  2. Animate shared elements (Hero views) in transitions between activities.
  3. Animate view changes within same activity.
Unless specified otherwise, all of the below tinting applies to both Lollipop and pre-Lollipop using AppCompat v21.
To use the support version of these attributes, remove the android namespace.
For instance, "android:colorControlNormal" becomes "colorControlNormal".
These attributes will be propagated to their corresponding attributes within the android namespace
for devices running Lollipop. Any exceptions to this will be noted by including the "android:" prefix.
All Clickable Views:
DalSoft / ExampleModel.cs
Created January 10, 2012 12:33
ASP.NET MVC 3 - Improved JsonValueProviderFactory using Json.Net
//Example of a model that won't work with the current JsonValueProviderFactory but will work with JsonDotNetValueProviderFactory
public class CmsViewModel
public bool IsVisible { get; set; }
public string Content { get; set; }
public DateTime Modified { get; set; }
public DateTime Created { get; set; }
//This property will not work with the current JsonValueProviderFactory
public dynamic UserDefined { get; set; }
* jQuery TextChange Plugin
* Copyright 2010, ZURB
* Released under the MIT License
(function($) {