mirror of
https://github.com/LeCoupa/awesome-cheatsheets.git
synced 2026-05-15 10:50:04 -07:00
Compare commits
9 Commits
5e786bba73
...
3260f2ce27
| Author | SHA1 | Date | |
|---|---|---|---|
| 3260f2ce27 | |||
| 8557d4f3d8 | |||
| f8d75a7ccf | |||
| 5ff48033e1 | |||
| 6c3b6ee90e | |||
| 7e9e6af408 | |||
| 0ee3753e2f | |||
| cb9ca87a4b | |||
| 9cf24371bf |
@@ -124,6 +124,7 @@ Feel free to take a look. You might learn new things. They have been designed to
|
||||
- [Nginx](tools/nginx.sh)
|
||||
- [PM2](tools/pm2.sh)
|
||||
- [Ubuntu](tools/ubuntu.sh)
|
||||
- [Firebase CLI](tools/firebase_cli.md)
|
||||
</details>
|
||||
|
||||
## 🙌🏼 How to Contribute?
|
||||
|
||||
+40
-2
@@ -8,6 +8,8 @@
|
||||
// MAIN.
|
||||
|
||||
php artisan clear-compiled // Remove the compiled class file
|
||||
php artisan db // Start a new database CLI session
|
||||
php artisan docs // Access the Laravel documentation
|
||||
php artisan down // Put the application into maintenance mode
|
||||
php artisan dump-server // Start the dump server to collect dump information.
|
||||
php artisan env // Display the current framework environment
|
||||
@@ -43,6 +45,9 @@ php artisan config:clear // Remove the configuration cache file
|
||||
// DB
|
||||
|
||||
php artisan db:seed // Seed the database with records
|
||||
php artisan db:show // Display information about the given database
|
||||
php artisan db:table // Display information about the given database table
|
||||
php artisan db:wipe // Drop all tables, views, and types
|
||||
|
||||
// EVENT
|
||||
|
||||
@@ -54,9 +59,10 @@ php artisan key:generate // Set the application key
|
||||
|
||||
// MAKE
|
||||
|
||||
php artisan make:auth // Scaffold basic login and registration views and routes
|
||||
php artisan make:cast // Create a new custom Eloquent cast class
|
||||
php artisan make:channel // Create a new channel class
|
||||
php artisan make:command // Create a new Artisan command
|
||||
php artisan make:component // Create a new view component class
|
||||
php artisan make:controller // Create a new controller class
|
||||
php artisan make:event // Create a new event class
|
||||
php artisan make:exception // Create a new custom exception class
|
||||
@@ -74,6 +80,7 @@ php artisan make:provider // Create a new service provider class
|
||||
php artisan make:request // Create a new form request class
|
||||
php artisan make:resource // Create a new resource
|
||||
php artisan make:rule // Create a new validation rule
|
||||
php artisan make:scope // Create a new scope class
|
||||
php artisan make:seeder // Create a new seeder class
|
||||
php artisan make:test // Create a new test class
|
||||
|
||||
@@ -86,6 +93,10 @@ php artisan migrate:reset // Rollback all database migrations
|
||||
php artisan migrate:rollback // Rollback the last database migration
|
||||
php artisan migrate:status // Show the status of each migration
|
||||
|
||||
// MODEL
|
||||
php artisan model:prune // Prune models that are no longer needed
|
||||
php artisan model:show // Show information about an Eloquent model
|
||||
|
||||
// NOTIFICATIONS
|
||||
|
||||
php artisan notifications:table // Create a migration for the notifications table
|
||||
@@ -100,13 +111,19 @@ php artisan package:discover // Rebuild the cached package manifest
|
||||
|
||||
// QUEUE
|
||||
|
||||
php artisan queue:batches-table // Create a migration for the batches database table
|
||||
php artisan queue:clear // Delete all of the jobs from the specified queue
|
||||
php artisan queue:failed // List all of the failed queue jobs
|
||||
php artisan queue:failed-table // Create a migration for the failed queue jobs database table
|
||||
php artisan queue:flush // Flush all of the failed queue jobs
|
||||
php artisan queue:forget // Delete a failed queue job
|
||||
php artisan queue:listen // Listen to a given queue
|
||||
php artisan queue:monitor // Monitor the size of the specified queues
|
||||
php artisan queue:prune-batches // Prune stale entries from the batches database
|
||||
php artisan queue:prune-failed // Prune stale entries from the failed jobs table
|
||||
php artisan queue:restart // Restart queue worker daemons after their current job
|
||||
php artisan queue:retry // Retry a failed queue job
|
||||
php artisan queue:retry-batch // Retry the failed jobs for a batch
|
||||
php artisan queue:table // Create a migration for the queue jobs database table
|
||||
php artisan queue:work // Start processing jobs on the queue as a daemon
|
||||
|
||||
@@ -116,9 +133,26 @@ php artisan route:cache // Create a route cache file for faster route r
|
||||
php artisan route:clear // Remove the route cache file
|
||||
php artisan route:list // List all registered routes
|
||||
|
||||
// SAIL
|
||||
|
||||
php artisan sail:install // Install Laravel Sail's default Docker Compose file
|
||||
php artisan sail:publish // Publish the Laravel Sail Docker files
|
||||
|
||||
// SANCTUM
|
||||
|
||||
php artisan sanctum:prune-expired // Prune tokens expired for more than specified number of hours.
|
||||
|
||||
// SCHEDULE
|
||||
|
||||
php artisan schedule:run // Run the scheduled commands
|
||||
php artisan schedule:clear-cache // Delete the cached mutex files created by scheduler
|
||||
php artisan schedule:list // List the scheduled commands
|
||||
php artisan schedule:run // Run the scheduled commands
|
||||
php artisan schedule:test // Run a scheduled command
|
||||
php artisan schedule:work // Start the schedule worker
|
||||
|
||||
// SCHEMA
|
||||
|
||||
php artisan schema:dump // Dump the given database schema
|
||||
|
||||
// SESSION
|
||||
|
||||
@@ -128,6 +162,10 @@ php artisan session:table // Create a migration for the session database
|
||||
|
||||
php artisan storage:link // Create a symbolic link from "public/storage" to "storage/app/public"
|
||||
|
||||
// STUD
|
||||
|
||||
php artisan stub:publish // Publish all stubs that are available for customization
|
||||
|
||||
// VENDOR
|
||||
|
||||
php artisan vendor:publish // Publish any publishable assets from vendor packages
|
||||
|
||||
@@ -0,0 +1,133 @@
|
||||
|
||||
Command alias Cmdlet name Description of command
|
||||
% ForEach-Object Performs an operation against each item in a collection of input objects.
|
||||
? Where-Object Selects objects from a collection based on their property values.
|
||||
ac Add-Content Appends content, such as words or data, to a file.
|
||||
asnp Add-PSSnapIn Adds one or more Windows PowerShell snap-ins to the current session.
|
||||
cat Get-Content Gets the contents of a file.
|
||||
cd Set-Location Sets the current working location to a specified location.
|
||||
chdir Set-Location Sets the current working location to a specified location.
|
||||
clc Clear-Content Deletes the contents of an item, but does not delete the item.
|
||||
clear Clear-Host Clears the display in the host program.
|
||||
clhy Clear-History Deletes entries from the command history.
|
||||
cli Clear-Item Deletes the contents of an item, but does not delete the item.
|
||||
clp Clear-ItemProperty Deletes the value of a property but does not delete the property.
|
||||
cls Clear-Host Clears the display in the host program.
|
||||
clv Clear-Variable Deletes the value of a variable.
|
||||
cnsn Connect-PSSession Reconnects to disconnected sessions
|
||||
compare Compare-Object Compares two sets of objects.
|
||||
copy Copy-Item Copies an item from one location to another.
|
||||
cp Copy-Item Copies an item from one location to another.
|
||||
cpi Copy-Item Copies an item from one location to another.
|
||||
cpp Copy-ItemProperty Copies a property and value from a specified location to another location.
|
||||
curl Invoke-WebRequest Gets content from a webpage on the Internet.
|
||||
cvpa Convert-Path Converts a path from a Windows PowerShell path to a Windows PowerShell provider path.
|
||||
dbp Disable-PSBreakpoint Disables the breakpoints in the current console.
|
||||
del Remove-Item Deletes files and folders.
|
||||
diff Compare-Object Compares two sets of objects.
|
||||
dir Get-ChildItem Gets the files and folders in a file system drive.
|
||||
dnsn Disconnect-PSSession Disconnects from a session.
|
||||
ebp Enable-PSBreakpoint Enables the breakpoints in the current console.
|
||||
echo Write-Output Sends the specified objects to the next command in the pipeline. If the command is the last command in the pipeline, the objects are displayed in the console.
|
||||
epal Export-Alias Exports information about currently defined aliases to a file.
|
||||
epcsv Export-Csv Converts objects into a series of comma-separated (CSV) strings and saves the strings in a CSV file.
|
||||
epsn Export-PSSession Imports commands from another session and saves them in a Windows PowerShell module.
|
||||
erase Remove-Item Deletes files and folders.
|
||||
etsn Enter-PSSession Starts an interactive session with a remote computer.
|
||||
exsn Exit-PSSession Ends an interactive session with a remote computer.
|
||||
fc Format-Custom Uses a customized view to format the output.
|
||||
fl Format-List Formats the output as a list of properties in which each property appears on a new line.
|
||||
foreach ForEach-Object Performs an operation against each item in a collection of input objects.
|
||||
ft Format-Table Formats the output as a table.
|
||||
fw Format-Wide Formats objects as a wide table that displays only one property of each object.
|
||||
gal Get-Alias Gets the aliases for the current session.
|
||||
gbp Get-PSBreakpoint Gets the breakpoints that are set in the current session.
|
||||
gc Get-Content Gets the contents of a file.
|
||||
gci Get-ChildItem Gets the files and folders in a file system drive.
|
||||
gcm Get-Command Gets all commands.
|
||||
gcs Get-PSCallStack Displays the current call stack.
|
||||
gdr Get-PSDrive Gets drives in the current session.
|
||||
ghy Get-History Gets a list of the commands entered during the current session.
|
||||
gi Get-Item Gets files and folders.
|
||||
gjb Get-Job Gets Windows PowerShell background jobs that are running in the current session.
|
||||
gl Get-Location Gets information about the current working location or a location stack.
|
||||
gm Get-Member Gets the properties and methods of objects.
|
||||
gmo Get-Module Gets the modules that have been imported or that can be imported into the current session.
|
||||
gp Get-ItemProperty Gets the properties of a specified item.
|
||||
gps Get-Process Gets the processes that are running on the local computer or a remote computer.
|
||||
group Group-Object Groups objects that contain the same value for specified properties.
|
||||
gsn Get-PSSession Gets the Windows PowerShell sessions on local and remote computers.
|
||||
gsnp Get-PSSnapIn Gets the Windows PowerShell snap-ins on the computer.
|
||||
gsv Get-Service Gets the services on a local or remote computer.
|
||||
gu Get-Unique Returns unique items from a sorted list.
|
||||
gv Get-Variable Gets the variables in the current console.
|
||||
gwmi Get-WmiObject Gets instances of Windows Management Instrumentation (WMI) classes or information about the available classes.
|
||||
h Get-History Gets a list of the commands entered during the current session.
|
||||
history Get-History Gets a list of the commands entered during the current session.
|
||||
icm Invoke-Command Runs commands on local and remote computers.
|
||||
iex Invoke-Expression Runs commands or expressions on the local computer.
|
||||
ihy Invoke-History Runs commands from the session history.
|
||||
ii Invoke-Item Performs the default action on the specified item.
|
||||
ipal Import-Alias Imports an alias list from a file.
|
||||
ipcsv Import-Csv Creates table-like custom objects from the items in a CSV file.
|
||||
ipmo Import-Module Adds modules to the current session.
|
||||
ipsn Import-PSSes sion Imports commands from another session into the current session.
|
||||
irm Invoke-RestMethod Sends an HTTP or HTTPS request to a RESTful web service.
|
||||
ise powershell_ise.exe Explains how to use the PowerShell_ISE.exe command-line tool.
|
||||
iwmi Invoke-WMIMethod Calls Windows Management Instrumentation (WMI) methods.
|
||||
iwr Invoke-WebRequest Gets content from a web page on the Internet.
|
||||
kill Stop-Process Stops one or more running processes.
|
||||
lp Out-Printer Sends output to a printer.
|
||||
ls Get-ChildItem Gets the files and folders in a file system drive.
|
||||
man help Displays information about Windows PowerShell commands and concepts.
|
||||
md mkdir Creates a new item.
|
||||
measure Measure-Object Calculates the numeric properties of objects, and the characters, words, and lines in string objects, such as files of text.
|
||||
mi Move-Item Moves an item from one location to another.
|
||||
mount New-PSDrive Creates temporary and persistent mapped network drives.
|
||||
move Move-Item Moves an item from one location to another.
|
||||
mp Move-ItemProperty Moves a property from one location to another.
|
||||
mv Move-Item Moves an item from one location to another.
|
||||
nal New-Alias Creates a new alias.
|
||||
ndr New-PSDrive Creates temporary and persistent mapped network drives.
|
||||
ni New-Item Creates a new item.
|
||||
nmo New-Module Creates a new dynamic module that exists only in memory.
|
||||
npssc New-PSSessionConfigurationFile Creates a file that defines a session configuration.
|
||||
nsn New-PSSession Creates a persistent connection to a local or remote computer.
|
||||
nv New-Variable Creates a new variable.
|
||||
ogv Out-GridView Sends output to an interactive table in a separate window.
|
||||
oh Out-Host Sends output to the command line.
|
||||
popd Pop-Location Changes the current location to the location most recently pushed to the stack. You can pop the location from the default stack or from a stack that you create by using the Push-Location cmdlet.
|
||||
ps Get-Process Gets the processes that are running on the local computer or a remote computer.
|
||||
pushd Push-Location Adds the current location to the top of a location stack.
|
||||
pwd Get-Location Gets information about the current working location or a location stack.
|
||||
r Invoke-History Runs commands from the session history.
|
||||
rbp Remove-PSBreakpoint Deletes breakpoints from the current console.
|
||||
rcjb Receive-Job Gets the results of the Windows PowerShell background jobs in the current session.
|
||||
rcsn Receive-PSSession Gets results of commands in disconnected sessions.
|
||||
rd Remove-Item Deletes files and folders.
|
||||
rdr Remove-PSDrive Deletes temporary Windows PowerShell drives and disconnects mapped network drives.
|
||||
ren Rename-Item Renames an item in a Windows PowerShell provider namespace.
|
||||
ri Remove-Item Deletes files and folders.
|
||||
rjb Remove-Job Deletes a Windows PowerShell background job.
|
||||
rm Remove-Item Deletes files and folders.
|
||||
rmdir Remove-Item Deletes files and folders.
|
||||
rmo Remove-Module Removes modules from the current session.
|
||||
rni Rename-Item Renames an item in a Windows PowerShell provider namespace.
|
||||
rnp Rename-ItemProperty Renames a property of an item.
|
||||
rp Remove-ItemProperty Deletes the property and its value from an item.
|
||||
rsn Remove-PSSession Closes one or more Windows PowerShell sessions (PSSessions).
|
||||
rsnp Remove-PSSnapin Removes Windows PowerShell snap-ins from the current session.
|
||||
rujb Resume-Job Restarts a suspended job
|
||||
rv Remove-Variable Deletes a variable and its value.
|
||||
rvpa Resolve-Path Resolves the wildcard characters in a path, and displays the path contents.
|
||||
rwmi Remove-WMIObject Deletes an instance of an existing Windows Management Instrumentation (WMI) class.
|
||||
sajb Start-Job Starts a Windows PowerShell background job.
|
||||
sal Set-Alias Creates or changes an alias (alternate name) for a cmdlet or other command element in the current Windows PowerShell session.
|
||||
saps Start-Process Starts one or more processes on the local computer.
|
||||
sasv Start-Service Starts one or more stopped services.
|
||||
sbp Set-PSBreakpoint Sets a breakpoint on a line, command, or variable.
|
||||
sc Set-Content Replaces the contents of a file with contents that you specify.
|
||||
select Select-Object Selects objects or object properties.
|
||||
set Set-Variable Sets the value of a variable. Creates the variable if one with the requested name does not exist.
|
||||
shcm Show-Command Creates Windows PowerShell commands in a graphical command window.
|
||||
si Set-Item Changes the value of an item to the valu
|
||||
@@ -72,6 +72,7 @@ array.splice(start, deleteCount, item1, item2, ...) // Adds and/or removes elem
|
||||
arr.unshift([element1[, ...[, elementN]]]) // Adds one or more elements to the front of an array and returns the new length of the array.
|
||||
|
||||
// Instance: accessor methods
|
||||
arr.at(index) // Returns the element at the specified index in the array.
|
||||
arr.concat(value1[, value2[, ...[, valueN]]]) // Returns a new array comprised of this array joined with other array(s) and/or value(s).
|
||||
arr.includes(searchElement, fromIndex) // Determines whether an array contains a certain element, returning true or false as appropriate.
|
||||
arr.indexOf(searchElement[, fromIndex]) // Returns the first (least) index of an element within the array equal to the specified value, or -1 if none is found.
|
||||
|
||||
@@ -0,0 +1,140 @@
|
||||
# Firebase CLI Guide
|
||||
|
||||
Firebase CLI (Command Line Interface) is a powerful tool that allows developers to interact with Firebase services and manage their Firebase projects directly from the command line. It provides a convenient and efficient way to deploy projects, manage databases, configure authentication, and more, streamlining the development and deployment processes.
|
||||
|
||||
## Installation
|
||||
|
||||
To use the Firebase CLI, you need to have Node.js and npm (Node Package Manager) installed on your system. Follow the steps below to install the Firebase CLI:
|
||||
|
||||
1. Install Node.js and npm by downloading the installer from the [official Node.js website](https://nodejs.org/en/download/) and following the installation instructions for your operating system.
|
||||
|
||||
2. Once Node.js and npm are installed, open your terminal or command prompt and run the following command to install the Firebase CLI globally:
|
||||
|
||||
```
|
||||
npm install -g firebase-tools
|
||||
```
|
||||
|
||||
This command will download and install the Firebase CLI package from the npm registry.
|
||||
|
||||
3. After the installation is complete, you can verify that the Firebase CLI is installed correctly by running the following command:
|
||||
|
||||
```
|
||||
firebase --version
|
||||
```
|
||||
|
||||
If the installation was successful, you will see the version number of the Firebase CLI printed in the terminal.
|
||||
|
||||
Congratulations! You have successfully installed the Firebase CLI.
|
||||
|
||||
## Usage
|
||||
|
||||
The Firebase CLI allows you to interact with Firebase services and manage your Firebase projects from the command line. Here are some common tasks you can perform using the Firebase CLI:
|
||||
|
||||
- Initialize a new Firebase project in your current directory.
|
||||
- Deploy your Firebase project to Firebase hosting.
|
||||
- Manage Firebase Authentication, Realtime Database, Cloud Firestore, Cloud Functions, and other Firebase services.
|
||||
- Configure Firebase project settings.
|
||||
- Interact with Firebase emulators for local development and testing.
|
||||
|
||||
To use the Firebase CLI, open your terminal or command prompt and run the `firebase` command followed by the desired command and options.
|
||||
|
||||
Here's an example of the basic usage:
|
||||
|
||||
```
|
||||
firebase <command> [options]
|
||||
```
|
||||
|
||||
Replace `<command>` with the specific Firebase command you want to execute, and `[options]` with any additional options or flags required for that command.
|
||||
|
||||
For more detailed usage information, you can run the following command:
|
||||
|
||||
```
|
||||
firebase help
|
||||
```
|
||||
|
||||
This command will display the available Firebase commands and provide detailed information about each command.
|
||||
|
||||
## Commands
|
||||
|
||||
Here are the commonly used Firebase CLI commands along with a brief explanation, syntax, and an example for each command:
|
||||
|
||||
- `firebase init`: Initializes a new Firebase project in the current directory.
|
||||
|
||||
- Syntax: `firebase init [options]`
|
||||
- Example: `firebase init hosting` initializes Firebase Hosting for the current project.
|
||||
|
||||
- `firebase deploy`: Deploys your Firebase project to Firebase hosting or other Firebase services.
|
||||
|
||||
- Syntax: `firebase deploy [options]`
|
||||
- Example: `firebase deploy --only hosting` deploys only the Firebase Hosting content.
|
||||
|
||||
- `firebase serve`: Starts local development servers and Firebase emulators.
|
||||
|
||||
- Syntax: `firebase serve [options]`
|
||||
- Example: `firebase serve --only functions,hosting` starts the Firebase emulators for functions and hosting.
|
||||
|
||||
- `firebase login`: Authenticates the Firebase CLI with your Firebase account.
|
||||
|
||||
- Syntax: `firebase login [options]`
|
||||
- Example: `firebase login --no-localhost` initiates an interactive login session without connecting to localhost.
|
||||
|
||||
- `firebase logout`: Logs out from the Firebase CLI.
|
||||
|
||||
- Syntax: `firebase logout [options]`
|
||||
- Example: `firebase logout` logs out the currently authenticated user.
|
||||
|
||||
- `firebase use`: Sets the active Firebase project for the current directory.
|
||||
|
||||
- Syntax: `firebase use <project_id> [options]`
|
||||
- Example: `firebase use my-project` sets "my-project" as the active Firebase project.
|
||||
|
||||
- `firebase functions`: Interacts with Firebase Cloud Functions.
|
||||
|
||||
- Syntax: `firebase functions:command [options]`
|
||||
- Example: `firebase functions:delete [function_name]` deletes all functions that match the specified name in all regions.
|
||||
|
||||
- `firebase database`: Interacts with Firebase Realtime Database.
|
||||
|
||||
- Syntax: `firebase database:command [options]`
|
||||
- Example: `firebase database:get /users` retrieves data from the Firebase Realtime Database.
|
||||
|
||||
- `firebase firestore`: Interacts with Firebase Cloud Firestore.
|
||||
|
||||
- Syntax: `firebase firestore:command [options]`
|
||||
- Example: `firebase firestore:delete collection/document` deletes a document from the Firestore database.
|
||||
|
||||
- `firebase auth`: Interacts with Firebase Authentication.
|
||||
|
||||
- Syntax: `firebase auth:command [options]`
|
||||
- Example: `firebase auth:export users.csv` exports user data to a CSV file.
|
||||
|
||||
- `firebase hosting`: Interacts with Firebase Hosting.
|
||||
|
||||
- Syntax: `firebase hosting:command [options]`
|
||||
- Example: `firebase hosting:disable` disables Firebase Hosting for the current project.
|
||||
|
||||
- `firebase remoteconfig`: Interacts with Firebase Remote Config.
|
||||
|
||||
- Syntax: `firebase remoteconfig:command [options]`
|
||||
- Example: `firebase remoteconfig:get template` retrieves the Remote Config template.
|
||||
|
||||
- `firebase ext`: Interacts with Firebase Extensions.
|
||||
|
||||
- Syntax: `firebase ext:command [options]`
|
||||
- Example: `firebase ext:install firebase/delete-user-data` installs the Firebase Extension named "firebase/delete-user-data".
|
||||
|
||||
- `firebase appdistribution`: Interacts with Firebase App Distribution.
|
||||
|
||||
- Syntax: `firebase appdistribution:command [options]`
|
||||
- Example: `firebase appdistribution:testers:add` Adds testers to the project.
|
||||
|
||||
- `firebase use --add`: Adds an existing Firebase project to the current directory
|
||||
|
||||
- Syntax: `firebase use --add`
|
||||
- Example: `firebase use --add` interactively adds an existing Firebase project.
|
||||
|
||||
- `firebase projects:create`: Creates a new Firebase project.
|
||||
- Syntax: `firebase projects:create [options]`
|
||||
- Example: `firebase projects:create --display-name "My Project"` creates a new Firebase project with the given display name.
|
||||
|
||||
These are just a few examples of the available commands. You can explore more commands and their options by running `firebase help` or visiting the [official Firebase CLI documentation](https://firebase.google.com/docs/cli).
|
||||
Reference in New Issue
Block a user