Steps to deploy Node.js to VPS using PM2 and Github Actions
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
object ImageCompressor { | |
/** | |
* @param context the application environment | |
* @param imageUri the input image uri. usually "content://..." | |
* @param imageFile file where the image was saved. For "photo from camera" scenarios. If it's | |
* null - we're creating the File inside the createFileAndCompress() | |
* @param compressFormat the output image file format | |
* @param maxWidth the output image max width | |
* @param maxHeight the output image max height |
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 'dart:async'; | |
import 'dart:typed_data'; | |
import 'dart:ui'; | |
const _BYTES_PER_PIXEL = 4; | |
class ImageEditor { | |
final int imageWidth; | |
final int imageHeight; | |
final ByteData _byteData; |
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
class PositionedOverlayEntry extends StatefulWidget { | |
final OverlayState overlay; | |
final Widget child; | |
final double? left; | |
final double? top; | |
final double? right; | |
final double? bottom; | |
final double? width; | |
final double? height; |
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 "Lazy navigation in SwiftUI" blogpost by Majid Jabrayilov | |
// Blogpost url: https://swiftwithmajid.com/2021/01/27/lazy-navigation-in-swiftui/ | |
// This gist shows an issue with using conditional NavigationLinks. | |
// When using StackNavigationViewStyle push animations are not present. | |
import SwiftUI | |
@main | |
struct LazyNavApp: App { | |
var body: some Scene { |
In computing, memoization or memoisation
is an optimization technique used primarily
to speed up computer programs by storing
the results of expensive function calls and
returning the cached result when the same
inputs occur again.
— wikipedia
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 android.Manifest | |
import android.content.Context | |
import android.content.Intent | |
import android.content.pm.PackageManager | |
import android.graphics.Bitmap | |
import android.media.MediaScannerConnection | |
import android.net.Uri | |
import android.os.Build |
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 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 |
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 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 |
Open iTerm2
brew install zsh
Running `brew update --preinstall`...
ohmyzsh: https://github.com/ohmyzsh/ohmyzsh/wiki/Installing-ZSH
NewerOlder