This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import L, { | |
LeafletEvent, | |
LeafletEventHandlerFn, | |
LeafletMouseEvent, | |
ZoomAnimEvent, | |
} from "leaflet"; | |
import { | |
AutoDetectOptions, | |
Container, | |
Renderer, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import SwiftUI | |
struct CameraCanvas: UIViewRepresentable { | |
var backgroundColor: UIColor? | |
let rendererView = UIView() | |
func makeUIView(context _: Context) -> UIView { | |
rendererView.backgroundColor = backgroundColor ?? UIColor.black | |
return rendererView | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Based on https://medium.com/@mahmudahsan/how-to-create-checkbox-in-swiftui-ad08e285ab3d | |
import SwiftUI | |
struct CheckboxField<Label: View>: View { | |
@Binding var checked: Bool | |
let label: Label | |
let size: CGFloat | |
let color: Color |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// customized text field based on @Anshuman Singh https://stackoverflow.com/questions/58311022/autofocus-textfield-programmatically-in-swiftui | |
import SwiftUI | |
struct CustomTextField: UIViewRepresentable { | |
class Coordinator: NSObject, UITextFieldDelegate { | |
@Binding var textInput: String | |
@Binding var nextResponder: Bool? | |
@Binding var isResponder: Bool? | |
var maxLength: Int? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package renderer | |
import ( | |
"github.com/stretchr/testify/assert" | |
"reflect" | |
"testing" | |
) | |
type T struct { | |
Apple int |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package utils | |
import ( | |
"reflect" | |
"unicode" | |
) | |
// ConvertStructToMap convert the struct to a map which has key with first lowercase letter. | |
// It skip the zero value of the struct. If you want keep zero value key, put it in the extra map. | |
func ConvertStructToMap(s reflect.Value, extraMap ...map[string]interface{}) map[string]interface{} { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM ubuntu:latest | |
RUN apt-get update && apt-get -y upgrade && apt-get install -y \ | |
git \ | |
zsh \ | |
vim \ | |
wget \ | |
clang \ | |
&& apt-get clean \ | |
&& rm -rf /var/lib/apt/lists/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM ubuntu:latest | |
RUN apt-get update && apt-get -y upgrade && apt-get install -y \ | |
git \ | |
zsh \ | |
vim \ | |
&& apt-get clean \ | |
&& rm -rf /var/lib/apt/lists/* | |
RUN git clone --recursive https://github.com/sorin-ionescu/prezto.git "${ZDOTDIR:-$HOME}/.zprezto" | |
COPY ./.zshrc / |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Copyright 2014 Google Inc. All rights reserved. | |
// | |
// Licensed under the Apache License, Version 2.0 (the 'License'); | |
// you may not use this file except in compliance with the License. | |
// You may obtain a copy of the License at | |
// | |
// http://www.apache.org/licenses/LICENSE-2.0 | |
// | |
// Unless required by applicable law or agreed to in writing, software | |
// distributed under the License is distributed on an 'AS IS' BASIS, |