This file contains 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
Using nvm-windows | |
nvm-windows (Node Version Manager for Windows) allows you to install and switch between different versions of Node.js. | |
reference Link | |
-https://www.freecodecamp.org/news/nvm-for-windows-how-to-download-and-install-node-version-manager-in-windows-10/ | |
Step-by-Step Instructions: | |
1. Uninstall Existing Node.js (optional): | |
If Node.js is already installed, it’s recommended to uninstall it to avoid conflicts. |
This file contains 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
Ref Link: | |
https://jwt-auth.readthedocs.io/en/docs/laravel-installation/ | |
https://medium.com/@online-web-tutor/laravel-10-restful-apis-with-jwt-authentication-tutorial-9f5345e3cce6 | |
Add JWT Auth | |
====================================================== | |
=> composer require tymon/jwt-auth | |
=> Add below in your app.php file from /config folder. | |
'providers' => [ | |
... |
This file contains 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
function sort_by_value($a, $b) { | |
return $b['score'] > $a['score'] ? 1 : -1; | |
} | |
//sort using usort | |
usort($events_temp, 'sort_by_value'); |
This file contains 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
----------Edit cron job --------------------- | |
-> write comman "crontab -e" | |
-> press "i" | |
-> go to last cron job. | |
-> add new cron job | |
-> press ESC -> press ":wq" | |
----------- File Permission give ------------ | |
*Give permission to .sh file* |
This file contains 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
********* | |
Open file path | |
-------------------- | |
$myfile = fopen("data/finalized-ids.txt", "a+") or die("Unable to open file!"); | |
Write something into file | |
-------------- | |
fwrite($myfile, "event_ids,". PHP_EOL); |
This file contains 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
Clone tables | |
--------------- | |
CREATE TABLE app_cities_temp LIKE app_cities; | |
INSERT INTO app_cities_temp SELECT * FROM app_cities; |
This file contains 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
1 --> create local server using pythin | |
run this commnad -> python -m SimpleHTTPServer | |
2 --> then open your server's ip address in browser. | |
Boom. your server is showing all file using only IP address. Warning - do ctrl + c after work is done. other wise your file publiclly shows on this ip. |
This file contains 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
// Reset auto increment id | |
ALTER TABLE tablename AUTO_INCREMENT = 1 | |
// copy new table with indexes (Do not copy data) | |
CREATE TABLE newtable LIKE oldtable; |
This file contains 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
Modes Description | |
r -> Open a file for read only. File pointer starts at the beginning of the file | |
w -> Open a file for write only. Erases the contents of the file or creates a new file if it doesn't exist. File pointer starts at the beginning of the file | |
a -> Open a file for write only. The existing data in file is preserved. File pointer starts at the end of the file. Creates a new file if the file doesn't exist | |
x -> Creates a new file for write only. Returns FALSE and an error if file already exists | |
r+ -> Open a file for read/write. File pointer starts at the beginning of the file | |
w+ -> Open a file for read/write. Erases the contents of the file or creates a new file if it doesn't exist. File pointer starts at the beginning of the file | |
a+ -> Open a file for read/write. The existing data in file is preserved. File pointer starts at the end of the file. Creates a new file if the file doesn't exist | |
x+ -> Creates a new file for read/write. Returns FALSE and an error if file already exists |
This file contains 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
Here is my learning from laravel things. | |
1. Homepage -> Route.php -> Controller -> Fetch Neccessory Information Database -> Eloquont Model -> Get Reposne -> COntroller -> Show Data. |
NewerOlder