Giter Site home page Giter Site logo

blogs's Introduction

Hi there ๐Ÿ‘‹

blogs's People

Contributors

thinhphan avatar

blogs's Issues

Hello World!

Lazy man in a Crazy world. I tried to stop procrastination but no luck for me or let's say "I'm Lazy Man".
So I start write blogs to organize my thoughts, learns, notes, ... in Github Issues (no fancy tasks like build scripts, commit ... just focus on writing).

  • Blog on Github Issues
  • Learn how to use

Get inspiration from onmyway133's blog

Update all repos in directory with single command

Run the following from the parent directory, plugins in this case:

find . -type d -depth 1 -exec git --git-dir={}/.git --work-tree=$PWD/{} pull origin master \;
To clarify:

find . : searches the current directory
-type d : to find directories, not files
-depth 1 : for a maximum depth of one sub-directory
-exec {} \; : runs a custom command for every find
git --git-dir={}/.git --work-tree=$PWD/{} pull git pulls the individual directories
To play around with find, I recommend using echo after -exec to preview, e.g.:

find . -type d -depth 1 -exec echo git --git-dir={}/.git --work-tree=$PWD/{} status \;
Note: if the -depth 1 option is not available, try -mindepth 1 -maxdepth 1.

Update answer for better solution:

ls | xargs -I{} git -C {} pull

To do it in parallel:

ls | xargs -P10 -I{} git -C {} pull

[git] Work well with Git

  1. Semver - Name your project in the right way

Given a version number MAJOR.MINOR.PATCH, increment the:

MAJOR version when you make incompatible API changes,
MINOR version when you add functionality in a backwards compatible manner, and
PATCH version when you make backwards compatible bug fixes.
Additional labels for pre-release and build metadata are available as extensions to the MAJOR.MINOR.PATCH format.

  1. Conventional Commits - Commit message for human reading

A specification for adding human and machine readable meaning to commit messages.
The Conventional Commits specification is a lightweight convention on top of commit messages.
It provides an easy set of rules for creating an explicit commit history; which makes it easier to write automated tools on top of. This convention dovetails with SemVer, by describing the features, fixes, and breaking changes made in commit messages.

Error: `main.jsbundle` does not exist. This must be a bug with React Native

Description

When building for Release

Reproduction

Additional Information

Solution

There are many cases that lead to this bug. And the root cause always point to 1 things bundle files.

Run bundle file manually (add to package.json > scripts). RN will bundle and generate main.jsbundle

"build-ios": "react-native bundle --entry-file index.js --platform ios --dev false --bundle-output ios/main.jsbundle --assets-dest ios",
 "build-android": "react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res",

Case 1: Check missing file in XCode > Targets App > Build Phase > Copy Bundle Resources
If not exist then add it
xcode- add main jsbundle into

Case 2: Disable script in XCode > Target App > Build Phase > Bundle React Native code and images
Comment out the react-native-xcode.sh then run bundle manually then Archive will success.
xcode - comment out script

Case 3: Update script in XCode > Target App > Build Phase > Bundle React Native code and images
Sometimes your node is install by nodeenv so you need to specify the path

References
https://stackoverflow.com/a/54645100/741197

[React-Native] `height` | `position` | `padding` in `KeyboardAvoidingView.behavior`

I agree that the lack of documentation here is frustrating. If you dig into the source code for KeyboardAvoidingView, you will find a switch around the behavior: KeyboardAvoidingView Component

It looks like the following is happening:

height
A <View> is returned with styling that attempts set a static height to the view that is either the screen height, or the screen height minus the keyboard when the keyboard is present.

position
A nested <View> is returned, where the outer View has your styles applied, and the inner View has a bottom style applied that attempts to match the keyboard height when the keyboard is present.

padding
A single <View> is returned where a paddingBottom style is applied to the height of the keyboard if the keyboard is present.

Given the arbitrary options available, it looks like when using the KeyboardAvoidingView you should exercise trial and error, and check both devices for your desired outcome. In theory all three options should work, but as the docs say there is some nuance between device types.

In my opinion, this component should be scrapped though, in favour of helper functions that would return keyboard heights over time, so you could apply your own style ideas directly based on keyboard visibility.

Notice

Xcode throws 'atomic_notify_one<unsigned long>' is unavailable

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.