diff --git a/architecture/concurrency/composable/ReadMe_composable.md b/architecture/concurrency/composable/ReadMe_composable.md index 5514fe4d..45850f39 100644 --- a/architecture/concurrency/composable/ReadMe_composable.md +++ b/architecture/concurrency/composable/ReadMe_composable.md @@ -27,18 +27,20 @@ Composable Architecture for keeping track of different states across the app. Ju ## References +[an-ios-architecture-approach-for-uiviewcontroller-states-error-management-in-swift](https://blog.smartnsoft.com/an-ios-architecture-approach-for-uiviewcontroller-states-error-management-in-swift-a353b0e53d94) -https://blog.smartnsoft.com/an-ios-architecture-approach-for-uiviewcontroller-states-error-management-in-swift-a353b0e53d94 ViewStates current state -https://swiftwithmajid.com/2019/01/23/maintaining-state-in-view-controllers/ +[maintaining-state-in-view-controllers](https://swiftwithmajid.com/2019/01/23/maintaining-state-in-view-controllers/) +[HWS | reflecting-loading-error-states-on-api-calls](https://www.hackingwithswift.com/forums/swiftui/reflecting-loading-error-states-on-api-calls/2561) -https://www.hackingwithswift.com/forums/swiftui/reflecting-loading-error-states-on-api-calls/2561 +[swift by sundell | handling-loading-states-in-swiftui](https://www.swiftbysundell.com/articles/handling-loading-states-in-swiftui/) -https://www.swiftbysundell.com/articles/handling-loading-states-in-swiftui/ [Documentation by Point free](https://pointfreeco.github.io/swift-composable-architecture/0.54.0/tutorials/meetcomposablearchitecture) + +[The Composable Architecture: My 3 Year Experience](https://rodschmidt.com/posts/composable-architecture-experience/) \ No newline at end of file diff --git a/backend/README_backend.md b/backend/README_backend.md index 19c2ad1f..b0e31f17 100644 --- a/backend/README_backend.md +++ b/backend/README_backend.md @@ -12,4 +12,4 @@ ## Reference -https://brightdigit.com/articles/best-backend-for-your-ios-app/ \ No newline at end of file +[best-backend-for-your-ios-app](https://brightdigit.com/articles/best-backend-for-your-ios-app/) diff --git a/database/docker/portainer.md b/database/docker/portainer.md index f35cf83e..21bfd45d 100644 --- a/database/docker/portainer.md +++ b/database/docker/portainer.md @@ -106,7 +106,22 @@ So sometimes when restarted it creates a race condition to map a folder / direct Sometimes -## Reference +### deployment error - request failed with status code 500 + +This could be because of port being bind previously and some process still has a lock. + +So we just restart our docker process by ssh the server. + +```sh +sudo service docker stop +sudo service docker stop +``` + +[SO | relevant thread](https://stackoverflow.com/a/65559403) + + + +## Reference Linux Media Server Script from this [Github](https://github.com/GreenFrogSB/LMDS) also helped a lot. diff --git a/database/mongoDB/README_mongoDB.md b/database/mongoDB/README_mongoDB.md deleted file mode 100644 index e69de29b..00000000 diff --git a/git/delete.md b/git/delete.md index 6caec6db..d9595817 100644 --- a/git/delete.md +++ b/git/delete.md @@ -28,33 +28,38 @@ Multiple options if we haven’t pushed the code to origin server. Option 1 : Undo commit and keep all files staged -> git reset --soft HEAD~; +```sh +git reset --soft HEAD~; +``` Option 2 : Undo commit and un-stage all files -```text -> git reset HEAD~; -OR -> git reset --mixed HEAD~; +```sh +git reset HEAD~; +# OR +git reset --mixed HEAD~; ``` Option 3 : Undo the commit and completely remove all changes -> git reset --hard HEAD~; +```sh +git reset --hard HEAD~; +``` [Source](https://bytefreaks.net/programming-2/how-to-undo-a-git-commit-that-was-not-pushed) ## Revert Range history -If your changes have already been pushed to a public, shared remote, and you want to revert all commits between HEAD and , then you can pass a commit range to git revert, +If your changes have already been pushed to a public, shared remote, and you want to revert all commits between HEAD and ``, then you can pass a commit range to git revert, -> git revert 56e05f..HEAD +```sh +git revert 56e05f..HEAD +``` and it will revert all commits between 56e05f and HEAD (excluding the start point of the range, 56e05f). - -[SO](https://stackoverflow.com/questions/1895059/revert-to-a-commit-by-a-sha-hash-in-git) +[SO | revert-to-a-commit-by-a-sha-hash-in-git](https://stackoverflow.com/questions/1895059/revert-to-a-commit-by-a-sha-hash-in-git) ## Delete till a point @@ -62,6 +67,7 @@ and it will revert all commits between 56e05f and HEAD (excluding the start poin If you want to go back to that commit before you made git merge commit you can specify the sha code to make the HEAD to that point. Eg. SHA: 4e8a118f -> git reset --hard $GIT_COMMIT_SHA - -[SO](https://stackoverflow.com/questions/2389361/undo-a-git-merge-that-hasnt-been-pushed-yet) +```sh +git reset --hard $GIT_COMMIT_SHA +``` +[SO | undo-a-git-merge-that-hasnt-been-pushed-yet](https://stackoverflow.com/questions/2389361/undo-a-git-merge-that-hasnt-been-pushed-yet) diff --git a/git/errors.md b/git/errors.md index 1907a630..ea0b8702 100644 --- a/git/errors.md +++ b/git/errors.md @@ -145,3 +145,12 @@ cp ~/.ssh/known_hosts ~/.ssh/known_hosts.bak [Dealing with SSH Host Key Changes](https://cat.pdx.edu/platforms/linux/remote-access/dealing-with-ssh-host-key-changes/) + + +### Connection reset by peer + +I don't know why it failed on this but after re-running the CI it worked fine again. + +```sh +fatal: unable to access 'https://github.com/PromiseKit/Alamofire/': Recv failure: Connection reset by peer +``` diff --git a/ios/ui/uiScrollView.md b/ios/ui/uiScrollView.md index 78bfad61..3392cef3 100644 --- a/ios/ui/uiScrollView.md +++ b/ios/ui/uiScrollView.md @@ -48,6 +48,7 @@ You can set the content offset from the scrollview to set its desired viewport. ```swift scrollView.setContentOffset(CGPoint(x: 35, y: 200), animated: false) ``` + ## AutoLayout Programmatically [Monkey Work Article](https://monkey.work/blog/2020-11-08-uiscrollview/) \ No newline at end of file diff --git a/ios/xcode/build_commands.md b/ios/xcode/build_commands.md index de759b3b..d03fae0e 100644 --- a/ios/xcode/build_commands.md +++ b/ios/xcode/build_commands.md @@ -2,8 +2,15 @@ ## Main Command -```bash -xcodebuild clean build test -workspace iOSTravisCI.xcworkspace -scheme iOSTravisCI -sdk iphonesimulator -destination "platform=iOS Simulator,OS=12.1,name=iPhone 7" ONLY_ACTIVE_ARCH=NO CODE_SIGNING_REQUIRED=NO +```sh +# Xcode 12 +xcodebuild clean build test -workspace iOSTravisCI.xcworkspace -scheme iOSTravisCI -sdk iphonesimulator -destination "platform=iOS Simulator,OS=12.1,name=iPhone 7" + +ONLY_ACTIVE_ARCH=NO CODE_SIGNING_REQUIRED=NO + +# Xcode 15.3 +xcodebuild -scheme "PCore" -destination "platform=iOS Simulator,OS=17.4,name=iPhone 15" build + ``` @@ -17,7 +24,6 @@ xcodebuild -scheme iOSTravisCI -workspace iOSTravisCI.xcworkspace/ build ```bash xcodebuild build-for-testing -workspace iOSTravisCI.xcworkspace -scheme iOSTravisCI -destination generic/platform=iOS - ``` diff --git a/mobile/ionic/issues.md b/mobile/ionic/issues.md index 8d89cff5..4bde9778 100644 --- a/mobile/ionic/issues.md +++ b/mobile/ionic/issues.md @@ -38,13 +38,21 @@ For example: I was able to fix by using cocoapods:1.1.1 -> \# sudo gem install -n /usr/local/bin cocoapods:1.1.1 \# sudo gem uninstall -n /usr/local/bin cocoapods \# uninstall 1.2.0.beta.1 $ pod --version \# 1.1.1 $ rm -rf platforms plugins $ cordova platform add ios +```sh +sudo gem install -n /usr/local/bin cocoapods:1.1.1 \ +sudo gem uninstall -n /usr/local/bin cocoapods \ # uninstall 1.2.0.beta.1 +pod --version \ # 1.1.1 +rm -rf platforms plugins +cordova platform add ios +``` ### EA Access Permissions Execute command -> \# sudo chown -R $\(whoami\) $\(npm config get prefix\)/{lib/node\_modules,bin,share} +```sh +sudo chown -R $\(whoami\) $\(npm config get prefix\)/{lib/node\_modules,bin,share} +``` It changes ownership with user\(whoami\) logged in for the default npm config location. @@ -64,11 +72,15 @@ Also if still doesn't fix your issue, you could switch to Tab "Capabilities" Scr If you get blank screen at launch with ionic app. As for me I just executed the command -> ionic cordova platform add ios +```sh +ionic cordova platform add ios +``` But forgot the build command -> ionic cordova build ios +```sh +ionic cordova build ios +``` ```text ERROR: Start Page at 'www/index.html' was not found. diff --git a/os/mac/mac_commands.md b/os/mac/mac_commands.md index 5ac5d590..64fd810e 100644 --- a/os/mac/mac_commands.md +++ b/os/mac/mac_commands.md @@ -8,11 +8,16 @@ This markdown file list downs all the commands for Mac OS for setting up with so Uptime for your mac -> uptime +```sh +uptime +``` For checking your reboots -> last reboot +```sh +last reboot +``` + ## Checking Mac Application Bundle ID diff --git a/process/copy_files_server_CLI.md b/process/copy_files_server_CLI.md index d5839799..88bad449 100644 --- a/process/copy_files_server_CLI.md +++ b/process/copy_files_server_CLI.md @@ -1,5 +1,8 @@ + +## SCP + Use command `scp ` _scp_ from remote to local using a single file . @@ -9,8 +12,19 @@ _scp_ from remote to local using a single file . scp remoteuser@remoteserver:/remote/folder/remotefile.txt localfile.txt ``` -https://www.simplified.guide/ssh/copy-file +Copy a single file from local to remote with _scp_. + +```sh +scp myfile.txt remoteuser@remoteserver:/remote/folder/ + +``` + +[ssh/copy-file](https://www.simplified.guide/ssh/copy-file) + + +[SO | copying-files-from-server-to-local-computer-using-ssh](https://stackoverflow.com/questions/30553428/copying-files-from-server-to-local-computer-using-ssh) + +[SO | subsystem-request-failed-on-channel-0-scp-connection-closed-macbook](https://stackoverflow.com/questions/74311661/subsystem-request-failed-on-channel-0-scp-connection-closed-macbook) + -https://stackoverflow.com/questions/30553428/copying-files-from-server-to-local-computer-using-ssh -https://stackoverflow.com/questions/74311661/subsystem-request-failed-on-channel-0-scp-connection-closed-macbook \ No newline at end of file diff --git a/tools/editors/markdown.md b/tools/editors/markdown.md index 0cac8f9e..91ae6d59 100644 --- a/tools/editors/markdown.md +++ b/tools/editors/markdown.md @@ -74,9 +74,8 @@ Read about [yaml](yaml.md) - ## Reference -https://www.w3schools.io/ +[w3schools.io](https://www.w3schools.io/) -https://placeholder.com/#How_To_Use_Our_Placeholders \ No newline at end of file +[How_To_Use_Our_Placeholders](https://placeholder.com/#How_To_Use_Our_Placeholders) diff --git a/tools/terminal/Curl.md b/tools/terminal/Curl.md index 580293e5..2731fce6 100644 --- a/tools/terminal/Curl.md +++ b/tools/terminal/Curl.md @@ -35,4 +35,11 @@ curl -s "http://url.something.com/filepath/filename-.m3u8?sz=asfa" ## Source man help - curl -[Manual](https://curl.se/docs/manual.html) \ No newline at end of file +[Manual](https://curl.se/docs/manual.html) + + +## Error + +### SSL error + +[SO | curl-60-ssl-certificate-problem-unable-to-get-local-issuer-certificate](https://stackoverflow.com/questions/24611640/curl-60-ssl-certificate-problem-unable-to-get-local-issuer-certificate) diff --git a/tools/terminal/node.md b/tools/terminal/node.md index 6b490557..6d04361f 100644 --- a/tools/terminal/node.md +++ b/tools/terminal/node.md @@ -4,11 +4,23 @@ ### Installation -> \# sudo npm install -g @angular/cli \# sudo npm install -g ionic@latest \# sudo npm install $ npm run ionic $ npm run ionic:serveStatic +```sh +sudo npm install -g @angular/cli + +sudo npm install -g ionic@latest + +sudo npm install + +npm run ionic + +npm run ionic:serveStatic +``` #### Downgrade -> $ npm install -g ionic@1.4.0 +```sh +npm install -g ionic@1.4.0 +``` \(version number after ionic@**\_.\_.\_**\) @@ -90,4 +102,23 @@ To run locally on chrome ## Node Package Manager Package repository -https://www.npmjs.com/package/package +[npmjs packages](https://www.npmjs.com/package/package) + +## Node Version Manager + +Node Version Manager - POSIX-compliant bash script to manage multiple active node.js versions +[NVM github](https://github.com/nvm-sh/nvm) + +```sh +# Download NVM +curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash + +# Verify Installation +command -v nvm + +# Restart terminal or source your `.zhsrc` config +source ~/.zshrc + +# Install Node +nvm install node +``` \ No newline at end of file diff --git a/tools/terminal/shell.md b/tools/terminal/shell.md index f5e7e681..1af0c1e5 100644 --- a/tools/terminal/shell.md +++ b/tools/terminal/shell.md @@ -1,4 +1,4 @@ -# Bash +# Shell ## Terminal Key Tags @@ -258,3 +258,10 @@ or you can use the shorter version of the command: [SO | how-to-load-bash-profile-when-entering-bash-from-within-zsh](https://stackoverflow.com/questions/23233603/how-to-load-bash-profile-when-entering-bash-from-within-zsh) + + +## Arch + +```sh +arch +``` \ No newline at end of file