Revoke TLS1.0 and TLS1.1 from Apache server
https://www.leaderssl.com/news/471-how-to-disable-outdated-versions-of-ssl-tls-in-apache https://www.digicert.com/kb/ssl-support/ssl-enabling-perfect-forward-secrecy.htm In your...
Read
Find top folders that take disk space on linux
https://www.tecmint.com/find-top-large-directories-and-files-sizes-in-linux/ https://askubuntu.com/questions/1224/how-do-i-determine-the-total-size-of-a-directory-folder-from-the-command-line...
Read
How to get file url from storage drive
https://stackoverflow.com/questions/28964412/how-to-get-file-path-using-storage-facade-in-laravel-5
s3
can be replaced with any drive name that you have set up
PHP - Extract numbers from string
https://stackoverflow.com/questions/6278296/extract-numbers-from-a-string
String example: ~8500~TOTALTOPAY
Using regex
Or, if you don't want to use regex
How to turn any web page into an app with Nativefier
https://github.com/jiahaog/nativefier https://www.superhi.com/video/how-to-turn-any-web-page-into-an-app-with-nativefier To customise the icon, I simply download the website's icon from the...
Read
How do I change the privileges for MySQL user that is already created?
https://serverfault.com/questions/115950/how-do-i-change-the-privileges-for-mysql-user-that-is-already-created To list users: To show privileges: To change privileges, first revoke. Such as: Then...
Read
Laravel - How to get the id of custom pivot table
Let's say you have a custom pivot table that is defined this way If you simply work with this table you as a model you will realise that the ID of the table was omitted. To get the ID add the you...
Read
How to remove the Intellij .idea folder from github repository
https://coderwall.com/p/qaiaog/remove-intellij-folders-from-your-github-repo
Make sure you have the ngrok file in your /usr/local/bin
directory
Git - How to merge detached HEAD to master
https://stackoverflow.com/questions/7124486/what-to-do-with-commit-made-in-a-detached-head Create a branch where you are, then switch to master and merge it:
Read
MySQL - Allow all remote connections, MySQL - (readonly and admin)
http://stackoverflow.com/questions/10236000/allow-all-remote-connections-mysql Important Note: You CAN’T grant permissions if you are not logged in as localhost. It will give you an error such as:...
Read
How to check which apache modules are enabled/installed?
https://superuser.com/questions/284898/how-to-check-which-apache-modules-are-enabled-installed
Read
Unix - How do erase the contents of a file but keep the file intact
http://superuser.com/questions/218214/how-do-erase-the-contents-of-a-error-log-file-but-keep-the-file-intact
Read
PHP - Check if string contains another string
https://stackoverflow.com/questions/4366730/how-do-i-check-if-a-string-contains-a-specific-word
This will check if the word are
is included in the sentence How are you?
Laravel - Test if event was called/dispatched
https://laravel.com/docs/5.8/mocking#event-fake
To test if event was called use the Event::fake()
function.
Also use it to prevent the event from continue running during tests and...
How to set the Legacy Swift Version for each Pod in Podfile Xcode 9.0 Swift 3.2 / Swift 4.0
https://stackoverflow.com/questions/40501440/how-to-set-the-legacy-swift-version-for-each-pod-in-podfile-xcode-9-0-swift-3-2
Read
Laravel - Linking storage directory to the public disk
https://laravel.com/docs/5.8/filesystem#the-public-disk
Read
Laravel - How to add values to request array from middleware
https://laraveldaily.com/how-to-artificially-add-values-to-request-array/ Middleware file: Controller file: Example: Middleware file: Controller file:
Read
How to Free up Unused Memory in Ubuntu/Linux Mint
http://www.upubuntu.com/2013/01/how-to-free-up-unused-memory-in.html Or NOTE: You can use cron jobs to schedule the commands above to run at specific time intervals.
Read
How To Find Website SSL Certificate Expiry Date Using Command Line
https://serverfault.com/questions/661978/displaying-a-remote-ssl-certificate-details-using-cli-tools
Read
OSX - Sudo a command without entering the password
https://superuser.com/questions/67765/sudo-with-password-in-one-command-line
Read
How to create a reverse port tunneling to your personal computer using an EC2 instance
https://www.tecmint.com/create-ssh-tunneling-port-forwarding-in-linux/ https://www.maketecheasier.com/reverse-ssh-tunnel-allow-external-connections/ https://gist.github.com/dapplebeforedawn/6206454...
Read
Supervisor - How to install and configure on Ubuntu
https://www.digitalocean.com/community/tutorials/how-to-install-and-manage-supervisor-on-ubuntu-and-debian-vps Installation Restart Configuration files can be found at /etc/supervisor/conf.d for...
Read
How to truncate a table in MySQL? (A lot faster than delete)
https://tableplus.com/blog/2018/08/mysql-how-to-truncate-all-tables.html
This is a lot faster than doing DELETE FROM table1