Skip to content

Instantly share code, notes, and snippets.

View xtabbas's full-sized avatar

xta xtabbas

View GitHub Profile
//------------------------------------------------------------------------
// The SwiftUI Lab: Advanced SwiftUI Animations
// https://swiftui-lab.com/swiftui-animations-part1 (Animating Paths)
// https://swiftui-lab.com/swiftui-animations-part2 (GeometryEffect)
// https://swiftui-lab.com/swiftui-animations-part3 (AnimatableModifier)
//------------------------------------------------------------------------
import SwiftUI
struct ContentView: View {
@chriseidhof
chriseidhof / collectionview.swift
Last active January 31, 2024 19:00
SwiftUI Flow Layout
//
// ContentView.swift
// DeleteMe
//
// Created by Chris Eidhof on 02.02.21.
//
import SwiftUI
/*
// The SwiftUI Lab: https://swiftui-lab.com
import SwiftUI
struct ContentView: View {
var body: some View {
Text("hello world!")
.padding(20)
.addBorder(Color.blue, width: 3.0, cornerRadius: 80)
}
}
@acdlite
acdlite / app.js
Last active January 20, 2023 08:23
Quick and dirty code splitting with React Router v4
// getComponent is a function that returns a promise for a component
// It will not be called until the first mount
function asyncComponent(getComponent) {
return class AsyncComponent extends React.Component {
static Component = null;
state = { Component: AsyncComponent.Component };
componentWillMount() {
if (!this.state.Component) {
getComponent().then(Component => {
@pbrisbin
pbrisbin / install.md
Last active August 25, 2021 14:06
Installing OpenCart on Heroku

Installation

This gets OpenCart running enough that we can use the GUI Installer

  1. Create Heroku project with ClearDB MySQL add-on
  2. Download OpenCart sources
  3. Move ./upload/* to top-level (those are the PHP site files)
  4. Copy zlib.so into ./ext/zlib.so
  5. Write extension = /app/www/ext/zlib.so into php.ini
  6. Push