This file contains hidden or 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
| https://www.programmersought.com/article/95776663199/ |
This file contains hidden or 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
| https://stackoverflow.com/questions/67399785/how-to-solve-npm-install-error-npm-err-code-1 | |
| When I try to run the npm install command in an older project, I faced the same issues and I resolved it by updating the dependencies in package.json to the latest versions by following these steps: | |
| delete folder node_modules folder and file package-lock.json | |
| install npm-check-updates globally, to update all packages to a new major version | |
| run npm install -g npm-check-updates | |
| run ncu -u to update dependencies in package.json to latest version |
This file contains hidden or 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
| lsof -n -i4TCP:3000 | |
| OR lsof -i:3000 | |
| Where 3000 is the port number the process is running at | |
| this returns the process id(PID) and run | |
| kill -9 "PID" |
This file contains hidden or 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
| export PATH="$PATH:$HOME/.composer/vendor/bin" | |
| valet install |
This file contains hidden or 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
| #!/usr/bin/env bash | |
| # This script installs PhantomJS on your Debian/Ubuntu System | |
| # | |
| # Taken from https://gist.github.com/julionc/7476620#gistcomment-2030572 and changed the download directory | |
| # | |
| # This script must be run as root: | |
| # sudo sh install_phantomjs.sh | |
| if [[ $EUID -ne 0 ]]; then | |
| echo "This script must be run as root" 1>&2 |
This file contains hidden or 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
| sudo chown -R www-data:www-data /var/www/wordpress |
This file contains hidden or 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
| <?php | |
| // Your code here! | |
| $current_year=2022; | |
| $amount_start = 20000; | |
| $start_age = 30; | |
| $pension_age = 60; | |
| $inflation_rate = 6; | |
| $amount = $amount_start; | |
| for($i=0;$i<=($pension_age - $start_age);$i++){ |
This file contains hidden or 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
| public function domPost($content) | |
| { | |
| libxml_use_internal_errors(true); | |
| $dom = new \DomDocument(); | |
| $dom->loadHtml('<?xml encoding="utf-8" ?>'.$content); // must include this to avoid font problem | |
| $images = $dom->getElementsByTagName('img'); | |
| if(count($images)>0) | |
| { | |
| foreach($images as $k => $img) | |
| { |
This file contains hidden or 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
| git checkout -- filename.txt |
This file contains hidden or 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
| sudo timedatectl set-timezone Asia/Dhaka |