Open iTerm2
brew install zsh
Running `brew update --preinstall`...
ohmyzsh: https://github.com/ohmyzsh/ohmyzsh/wiki/Installing-ZSH
#!/bin/bash | |
NDK=/Volumes/Samsung-T5/sdk/android-ndk-r21b | |
TOOLCHAIN=$NDK/toolchains/llvm/prebuilt/darwin-x86_64 | |
API=21 | |
function build_android() { | |
cd ffmpeg-4.3.1 | |
echo "Compiling FFmpeg for $CPU" | |
./configure \ |
# remove iOS bitcode | |
flutter build ios | |
cd build/ios/iphoneos/Runner.app/Frameworks | |
cd App.framework | |
xcrun bitcode_strip -r app -o app | |
cd .. | |
cd Flutter.framework | |
xcrun bitcode_strip -r Flutter -o Flutter | |
cd ../../../../../../ |
import AsyncStorage from '@react-native-community/async-storage'; | |
import { | |
setGenericPassword, | |
getGenericPassword, | |
resetGenericPassword, | |
} from 'react-native-keychain'; | |
const KeychainStorage = { | |
async getAllKeys(cb) { | |
try { |
import SwiftUI | |
import os | |
@main | |
struct ios14DemoApp: App { | |
@StateObject var notificationCenter = NotificationCenter() | |
@UIApplicationDelegateAdaptor private var appDelegate: AppDelegate | |
var body: some Scene { | |
WindowGroup { |
// | |
// Created by https://quickplan.app on 2020/11/8. | |
// | |
import SwiftUI | |
/// Control if allow to dismiss the sheet by the user actions | |
/// - Drag down on the sheet on iPhone and iPad | |
/// - Tap outside the sheet on iPad | |
/// No impact to dismiss programatically (by calling "presentationMode.wrappedValue.dismiss()") |
// Take photo from camera and save it to public gallery | |
// Before Q and After Q implementations | |
// Answer riginally taken from this SO answer | |
// https://stackoverflow.com/a/59482148/5695091 | |
private val REQUEST_TAKE_PHOTO = 101 | |
private val REQUEST_PICK_PHOTO = 102 | |
private var photoURI : Uri? = null | |
extension UIHostingController { | |
convenience public init(rootView: Content, ignoreSafeArea: Bool) { | |
self.init(rootView: rootView) | |
if ignoreSafeArea { | |
disableSafeArea() | |
} | |
} | |
func disableSafeArea() { |
Open iTerm2
brew install zsh
Running `brew update --preinstall`...
ohmyzsh: https://github.com/ohmyzsh/ohmyzsh/wiki/Installing-ZSH
import android.annotation.TargetApi | |
import android.content.ContentUris | |
import android.content.Context | |
import android.database.Cursor | |
import android.graphics.Bitmap | |
import android.graphics.Bitmap.createBitmap | |
import android.graphics.BitmapFactory | |
import android.graphics.Matrix | |
import android.net.Uri | |
import android.opengl.GLES10 |
import android.animation.* | |
import android.app.Activity | |
import android.content.* | |
import android.content.Context.CLIPBOARD_SERVICE | |
import android.content.pm.PackageManager | |
import android.content.res.ColorStateList | |
import android.graphics.Color | |
import android.graphics.Typeface | |
import android.net.Uri | |
import android.provider.Settings |