Skip to content

Instantly share code, notes, and snippets.

View softlion's full-sized avatar

ZeBen softlion

View GitHub Profile
/*!
* jQuery TextChange Plugin
* http://www.zurb.com/playground/jquery-text-change-custom-event
* https://gist.github.com/424774
*
* Copyright 2010, ZURB
* Released under the MIT License
*/
(function($) {
@DalSoft
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; }
}
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:
-----------
@lopspower
lopspower / README.md
Last active December 24, 2023 13:01
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.
@zacwest
zacwest / ios-font-sizes.swift
Last active March 27, 2024 07:16
iOS default font sizes - also available on https://www.iosfontsizes.com
let styles: [UIFont.TextStyle] = [
// iOS 17
.extraLargeTitle, .extraLargeTitle2,
// iOS 11
.largeTitle,
// iOS 9
.title1, .title2, .title3, .callout,
// iOS 7
.headline, .subheadline, .body, .footnote, .caption1, .caption2,
]
@snowzurfer
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
@VincentH-Net
VincentH-Net / GenerateOpenApiOnBuildFromNet8MinimalApi.md
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:

  <ItemGroup>
  	<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="8.0.0-preview.4.23260.4" />