[update][tutorial] reduce memory usage in Google Chrome Browser
Google Chrome informed me that the great suspender extension contains malware. Here is a screenshot of the malware alert. I installed this extension to save memory by suspending inactive tabs. But Google Chrome browser, now, has a similar functionality, so, I don’t need this extension anymore. I uninstalled the Chrome extension. Then checked Memory Saver option in Chrome Settings (as you can see in the below image). Memory Saver option is to free up memory from inactive tabs.
[tutorial] How to rate limit http requests in Laravel ?
Rate Limiting is the process of limiting the number of requests per minute sent to a web application is often necessary to protect against attacks trying to saturate your server or to brute force authentication forms. So Laravel framework has a rate limiting mechanism, which we will use now to rate limit http requests per minute for all routes or some of them. You can rate limit for all users or per user.
convert old('d') to $model->d in Laravel using regular expressions (RegEx)
While developing a website in PHP Laravel, I reused create.blade.php as edit.blade.php. So I need to edit some things, especially the input values. In create.blade.php we use old('something') to retain the current <input> value by the user. But in edit.blade.php we use $model->something to get the <input> value from the project backend. So, I need to convert every old() to $model. But I am too lazy to rewrite all of them manually.
Git Delete Remote Branch β How to Remove a Remote Branch in Git
To show branches, use git branch. If you want to show all branches even the remote ones, use git branch -a. To delete a branch, use git branch -d <branch-name>. If the branch name is refactor-feature-x, so the command will be git branch -d refactor-feature-x. But this command deletes the local branch only. The branch on your local machine. What about deleting the remote branch? The branch on the remote machine/repo.
[fixed] Error: lulu: uninstall script /Applications/LuLu.app/Contents/Resources/LuLu Uninstaller.app/Contents/MacOS/LuLu Uninstaller does not exist.
When I tried to upgrade LuLu the firewall with command brew upgrade lulu, I faced this error. Error: lulu: uninstall script /Applications/LuLu.app/Contents/Resources/LuLu Uni nstaller.app/Contents/MacOS/LuLu Uninstaller does not exist. Then thought of trying to remove/uninstall lulu, then re-install it. So, I ran brew remove --cask lulu using homebrew package manager. But the same error occurred. I thought maybe it did not upgrade as I did not use --cask in the first command.
Strict Secure Cookie policy does not allow setting a secure cookie for apps targeting >= R
After updating my app to compile with API level 30 (Android R, 11), I can’t see AdMob test ads, and I’m receiving this error in the log: Strict Secure Cookie policy does not allow setting a secure cookie for http://googleads.g.doubleclick.net/ for apps targeting >= R. Please either use the ‘https:’ scheme for this URL or omit the ‘Secure’ directive in the cookie value. I’m using the lastest AdMob version, and I don’t have “org.
[fixed] error duplicate class Kotlin Android
Here is a sample of error message. Duplicate class kotlin.collections.jdk8.CollectionsJDK8Kt found in modules jetified-kotlin-stdlib-1.8.0 (org.jetbrains.kotlin:kotlin-stdlib:1.8.0) and jetified-kotlin-stdlib-jdk8-1.6.0 (org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.6.0) Duplicate class kotlin.internal.jdk7.JDK7PlatformImplementations found in modules jetified-kotlin-stdlib-1.8.0 (org.jetbrains.kotlin:kotlin-stdlib:1.8.0) and jetified-kotlin-stdlib-jdk7-1.6.0 (org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.6.0) Duplicate class kotlin.internal.jdk8.JDK8PlatformImplementations found in modules jetified-kotlin-stdlib-1.8.0 (org.jetbrains.kotlin:kotlin-stdlib:1.8.0) and jetified-kotlin-stdlib-jdk8-1.6.0 (org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.6.0) Duplicate class kotlin.io.path.ExperimentalPathApi found in modules jetified-kotlin-stdlib-1.8.0 (org.jetbrains.kotlin:kotlin-stdlib:1.8.0) and jetified-kotlin-stdlib-jdk7-1.6.0 (org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.6.0) Duplicate class kotlin.io.path.PathRelativizer found in modules jetified-kotlin-stdlib-1.8.0 (org.jetbrains.kotlin:kotlin-stdlib:1.8.0) and jetified-kotlin-stdlib-jdk7-1.6.0 (org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.6.0) Duplicate class kotlin.io.path.PathsKt found in modules jetified-kotlin-stdlib-1.8.0 (org.jetbrains.kotlin:kotlin-stdlib:1.8.0) and jetified-kotlin-stdlib-jdk7-1.
Flutter Gradle task assembleDebug failed with exit code 1 zip END header not found
The error code is this. exception in thread "main" java.util.zip.ZipException: zip END header not found at java.base/java.util.zip.ZipFile$Source.zerror(ZipFile.java:1567) at java.base/java.util.zip.ZipFile$Source.findEND(ZipFile.java:1462) at java.base/java.util.zip.ZipFile$Source.initCEN(ZipFile.java:1469) at java.base/java.util.zip.ZipFile$Source.(ZipFile.java:1274) at java.base/java.util.zip.ZipFile$Source.get(ZipFile.java:1237) at java.base/java.util.zip.ZipFile$CleanableResource.(ZipFile.java:727) at java.base/java.util.zip.ZipFile$CleanableResource.get(ZipFile.java:844) at java.base/java.util.zip.ZipFile.(ZipFile.java:247) at java.base/java.util.zip.ZipFile.(ZipFile.java:177) at java.base/java.util.zip.ZipFile.(ZipFile.java:191) at org.gradle.wrapper.Install.unzip(Install.java:214) at org.gradle.wrapper.Install.access$600(Install.java:27) at org.gradle.wrapper.Install$1.call(Install.java:74) at org.gradle.wrapper.Install$1.call(Install.java:48) at org.gradle.wrapper.ExclusiveFileAccessManager.access(ExclusiveFileAccessManager.java:65) at org.gradle.wrapper.Install.createDist(Install.java:48) at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:128) at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:61) Exception: Gradle task assembleDebug failed with exit code 1 This Problem came from gradle file is corrupted in your system.
How to get filename without the extension in Fish script?
We can use string split like this (string split -r -m1 . $filename)[1]. I use this method in my Fish script function. function vidfps --description "vidfps <input.mp4>" ffmpeg -i $argv -filter:v fps=fps=24 (string split -r -m1 . $argv)[1]-24fps.mp4 end The above function is located in my ~/.config/fish/config.fish file. So I can use it to convert a video to a 24 frames-per-second video using ffmpeg. the code (string split -r -m1 .
10 Things we knew from open-sourced Twitter algorithm
Twitter (now called X Corp) revealed its algorithm to the world as open source on GitHub . But what does it mean for you? I spent the evening analyzing it. Hereβs what you need to know: 1. Likes, then retweets, then replies π Hereβs the ranking parameters: Each like gets a 30x boost Each retweet a 20x Each reply only 1x Itβs much more impactful to earn likes and retweets than replies.