Skip to content

Instantly share code, notes, and snippets.

Avatar
🐝

Don Schnitzius don1138

🐝
View GitHub Profile
@don1138
don1138 / blender_python_modifier_chars.py
Last active Sep 23, 2020
Modifier Key Symbols for Text Labels
View blender_python_modifier_chars.py
# If you want to use modifier keys symbols in your text labels, use these:
# Control ⌃
# Option/Alt ⌥
# Shift ⇧
# Command ⌘
@don1138
don1138 / text-format-settings.swift
Last active Sep 18, 2020
Style settings for SwiftUI Text object
View text-format-settings.swift
// Xcode - Text Formatting
// https://daddycoding.com/2019/12/26/swiftui-text/
Text("Sample Text")
.font(.system(
size: 15,
weight: .semibold,
design: .default // .default, .serif, .rounded, .monospaced
))
@don1138
don1138 / easings.css
Created Sep 13, 2020 — forked from ControlledChaos/easings.css
Handy CSS properties for easing functions
View easings.css
:root {
--ease-in-quad: cubic-bezier(0.55, 0.085, 0.68, 0.53);
--ease-in-cubic: cubic-bezier(0.55, 0.055, 0.675, 0.19);
--ease-in-quart: cubic-bezier(0.895, 0.03, 0.685, 0.22);
--ease-in-quint: cubic-bezier(0.755, 0.05, 0.855, 0.06);
--ease-in-expo: cubic-bezier(0.95, 0.05, 0.795, 0.035);
--ease-in-circ: cubic-bezier(0.6, 0.04, 0.98, 0.335);
--ease-out-quad: cubic-bezier(0.25, 0.46, 0.45, 0.94);
--ease-out-cubic: cubic-bezier(0.215, 0.61, 0.355, 1);
--ease-out-quart: cubic-bezier(0.165, 0.84, 0.44, 1);
@don1138
don1138 / set-percentage-width.swift
Last active Sep 23, 2020
Use percentage widths on SwiftUI layout objects
View set-percentage-width.swift
// Get screen width and subtract Safe Area margins
var containerWidth:CGFloat = UIScreen.main.bounds.width - 32.0
// Set frame width of each column using (containerWidth * percentage)
HStack (spacing:0) {
HStack {
Text("Column 25% Width")
}
.frame(width: containerWidth * 0.25)
HStack {
@don1138
don1138 / list-separator-color.swift
Last active Feb 15, 2021
Set custom color on List Separator in SwiftUI (deprecated in iOS 14)
View list-separator-color.swift
var body: some View {
// Add this right after declaring body view:
UITableView.appearance().separatorColor = UIColor(red:(128/255), green:(128/255), blue:(128/255), alpha: 1)
return NavigationView{
List {}
.navigationBarTitle("", displayMode: .inline)
.navigationBarHidden(true)
}
View ghost-element-vertical-align.css
/* This parent can be any width and height */
.block {
text-align: center;
/* May want to do this if there is risk the container may be narrower than the element inside */
white-space: nowrap;
}
/* The ghost, nudged to maintain perfect centering */
.block:before {
View system-font-stack.css
/* via "Operating systems default sans-serif fonts" (https://fontsarena.com/blog/operating-systems-default-sans-serif-fonts) */
font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Ubuntu, "Helvetica Neue", Oxygen, Cantarell, sans-serif;
/* System Fonts as used by GitHub */
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
/* System Fonts as used by Medium and WordPress */
font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;
View webkit-only.css
@media all and (-webkit-min-device-pixel-ratio: 1){
selectors {
properties: values;
}
}
View display-as-table.css
@media screen and (min-width: 720px) {
.table {
display: table;
width: 100%;
border-collapse: collapse;
}
}
.tr {
margin-bottom: 1.6rem;
View header-anchor-inherit-color.css
h1 a , h2 a , h3 a , h4 a , h5 a , h6 a {
color:inherit;
opacity:1;
}
h1 a:hover , h2 a:hover , h3 a:hover , h4 a:hover , h5 a:hover, h6 a:hover{
color:inherit;
opacity:0.8;
}