You can undo git add
before commit with
git reset <file>
or
git reset <directory>
It will not delete any of your files
.gitignore could be useful before executing git add *
- Step 1
touch .gitignore
- Step 2
.DS_Store /vendor
You can undo git add
before commit with
git reset <file>
or
git reset <directory>
It will not delete any of your files
touch .gitignore
.DS_Store /vendor
That means space/memory issue on your server
Free space !
du -skh .
df
#1 – sudo lsblk -f
#2 – [ec2-user ~]$ sudo mount /dev/xvdf /data
After you attach an Amazon EBS volume to your instance, it is exposed as a block device. You can format the volume with any file system and then mount it. After you make the EBS volume available for use, you can access it in the same ways that you access any other volume. Any data written to this file system is written to the EBS volume and is transparent to applications using the device.
You can take snapshots of your EBS volume for backup purposes or to use as a baseline when you create another volume. For more information, see Amazon EBS snapshots.
You can get directions for volumes on a Windows instance from Make a volume available for use on Windows in the Amazon EC2 User Guide for Windows Instances.
Suppose that you have an EC2 instance with an EBS volume for the root device, /dev/xvda
, and that you have just attached an empty EBS volume to the instance using /dev/sdf
. Use the following procedure to make the newly attached volume available for use.
To format and mount an EBS volume on Linux
/dev/
prefix from full device paths.The following is example output for an instance built on the Nitro System, which exposes EBS volumes as NVMe block devices. The root device is /dev/nvme0n1
. The attached volume is /dev/nvme1n1
, which is not yet mounted.[ec2-user ~]$ lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
nvme1n1 259:0 0 10G 0 disk
nvme0n1 259:1 0 8G 0 disk
-nvme0n1p1 259:2 0 8G 0 part /
-nvme0n1p128 259:3 0 1M 0 part
The following is example output for a T2 instance. The root device is /dev/xvda
. The attached volume is /dev/xvdf
, which is not yet mounted.[ec2-user ~]$ lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
xvda 202:0 0 8G 0 disk
-xvda1 202:1 0 8G 0 part /
xvdf 202:80 0 10G 0 disk
data
, as in the following example output, there is no file system on the device[ec2-user ~]$ sudo file -s /dev/xvdf
/dev/xvdf: data
If the device has a file system, the command shows information about the file system type. For example, the following output shows a root device with the XFS file system.[ec2-user ~]$ sudo file -s /dev/xvda1
/dev/xvda1: SGI XFS filesystem data (blksz 4096, inosz 512, v2 dirs)
[ec2-user ~]$ sudo lsblk -f
For example, the following output shows that there are three devices attached to the instances—nvme1n1
, nvme0n1
, and nvme2n1
. The first column lists the devices and their partitions. The FSTYPE
column shows the file system type for each device. If the column is empty for a specific device, it means that the device does not have a file system. In this case, nvme1n1
, nvme0n1
are both formatted using the XFS file system, while nvme2n1
does not have a file system.NAME FSTYPE LABEL UUID MOUNTPOINT
nvme1n1 xfs 7f939f28-6dcc-4315-8c42-6806080b94dd
nvme0n1
├─nvme0n1p1 xfs / 90e29211-2de8-4967-b0fb-16f51a6e464c /
└─nvme0n1p128
nvme2n1
[ec2-user ~]$ sudo mkfs -t xfs /dev/xvdf
If you get an error that mkfs.xfs
is not found, use the following command to install the XFS tools and then repeat the previous command:[ec2-user ~]$ sudo yum install xfsprogs
/data
.[ec2-user ~]$ sudo mkdir /data
[ec2-user ~]$ sudo mount /dev/xvdf /data
To mount an attached EBS volume on every system reboot, add an entry for the device to the /etc/fstab
file.
You can use the device name, such as /dev/xvdf
, in /etc/fstab
, but we recommend using the device’s 128-bit universally unique identifier (UUID) instead. Device names can change, but the UUID persists throughout the life of the partition. By using the UUID, you reduce the chances that the system becomes unbootable after a hardware reconfiguration. For more information, see Identify the EBS device.
To mount an attached volume automatically after reboot
/etc/fstab
file that you can use if you accidentally destroy or delete this file while editing it.[ec2-user ~]$ sudo cp /etc/fstab /etc/fstab.orig
[ec2-user ~]$ sudo blkid
/dev/xvda1: LABEL="/" UUID="ca774df7-756d-4261-a3f1-76038323e572" TYPE="xfs" PARTLABEL="Linux" PARTUUID="02dcd367-e87c-4f2e-9a72-a3cf8f299c10"
/dev/xvdf: UUID="aebf131c-6957-451e-8d34-ec978d9581ae" TYPE="xfs"
For Ubuntu 18.04 use the lsblk command.[ec2-user ~]$ sudo lsblk -o +UUID
/etc/fstab
file using any text editor, such as nano or vim.[ec2-user ~]$ sudo vim /etc/fstab
/etc/fstab
to mount the device at the specified mount point. The fields are the UUID value returned by blkid (or lsblk for Ubuntu 18.04), the mount point, the file system, and the recommended file system mount options. For more information, see the manual page for fstab (run man fstab).UUID=aebf131c-6957-451e-8d34-ec978d9581ae /data xfs defaults,nofail 0 2
NoteIf you ever boot your instance without this volume attached (for example, after moving the volume to another instance), the nofail
mount option enables the instance to boot even if there are errors mounting the volume. Debian derivatives, including Ubuntu versions earlier than 16.04, must also add the nobootwait
mount option./etc/fstab
. If there are no errors, the /etc/fstab
file is OK and your file system will mount automatically after it is rebooted.[ec2-user ~]$ sudo umount /data
[ec2-user ~]$ sudo mount -a
If you receive an error message, address the errors in the file.WarningErrors in the /etc/fstab
file can render a system unbootable. Do not shut down a system that has errors in the /etc/fstab
file.If you are unsure how to correct errors in /etc/fstab
and you created a backup file in the first step of this procedure, you can restore from your backup file using the following command.[ec2-user ~]$ sudo mv /etc/fstab.orig /etc/fstab
<script type="application/javascript">
window.scrollTo(0,document.body.scrollHeight);
</script>
php artisan make:model --migration --controller ContactForm
public function up() { Schema::create('contact_forms', function (Blueprint $table) { $table->id(); $table->text('name'); $table->text('email'); $table->text('subject'); $table->longText('Message'); $table->timestamps(); }); }
php artisan migrate
Route::post('/contactform', 'ContactFormController@store' );
/** * Laravel basic verification of the field email */ $this->validate($request, [ 'email' => 'required|email', ]); /** * Create new record in teh database */ $contactForm = ContactForm::firstOrCreate([ 'email' => request('email'), 'name' => request('name'), 'message' => request('message'), 'subject' => request('subject'), ]); if (request()->wantsJson()) { Mail::to('[email protected]', request('contactform')) ->send(new \App\Mail\ContactForm($request)); return response('Success Form has been Sent', 201); } /** * Redirect to the successful page creation */ return redirect('/')->with('flash', 'Success You subscribed to our Newsletter ');
php artisan make:mail ContactForm --markdown=emails.contactform
Error when executing
php artisan route:list -c
storage/oauth-private.key does not exist or is not readable
php artisan config:clear php artisan key:generate php artisan config:clear
php artisan route:list -c
#1 – Make sure the composer.json looks like this
"require": {
"php": "^7.2",
"fideloper/proxy": "^4.0",
"laravel/framework": "^8.0",
"laravel/passport": "^10.0",
"laravel/socialite": "^5.0",
"laravel/tinker": "^2.0",
"laravel/ui": "^3.0",
"predis/predis": "^1.1"
},
"require-dev": {
"facade/ignition": "^2.3.6",
"mockery/mockery": "^1.0",
"nunomaduro/collision": "^5.0",
"phpunit/phpunit": "^9"
}
#2 – if you see following issue
laravel/framework replaces illuminate/support and thus cannot coexist with it.
Remove remove illuminate/support
composer remove illuminate/support
#3 – The report, render, shouldReport, and renderForConsole methods of your application’s App\Exceptions\Handler class should accept instances of the Throwable interface instead of Exception instances: Change app/Exceptions/Handler.php as follow
<?php
namespace App\Exceptions;
use Throwable;
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
class Handler extends ExceptionHandler
{
/**
* A list of the exception types that are not reported.
*
* @var array
*/
protected $dontReport = [
//
];
/**
* A list of the inputs that are never flashed for validation exceptions.
*
* @var array
*/
protected $dontFlash = [
'password',
'password_confirmation',
];
/**
* Report or log an exception.
*
* @param \Throwable $exception
* @return void
*/
public function report(Throwable $exception)
{
parent::report($exception);
}
/**
* Render an exception into an HTTP response.
*
* @param \Illuminate\Http\Request $request
* @param \Throwable $exception
* @return \Illuminate\Http\Response
*/
public function render($request, Throwable $exception)
{
return parent::render($request, $exception);
}
}
php artisan config:clear
php artisan key:generate
php artisan config:clear
The HyperText Transfer Protocol (HTTP) 422 Unprocessable Entity response status code indicates that the server understands the content type of the request entity, and the syntax of the request entity is correct, but it was unable to process the contained instructions.
All issues such as
Error: Cannot find module 'interpret'
Error: Cannot find module 'read-pkg-up'
Error: Cannot find module 'lru-cache'
delete package-lock.json
npm upgrade
MRE1=92 -2147467259 SaveReport failed to save the file "0429C038" for report 364. (error 80004005)
satoriTemplateClass standard-letter
records_count 287
permit_number 892
piece_height 8.5
piece_weight 0
piece_width 0
piece_thickness 0.0294
post_office_drop_date 2021-03-24
presort_class standard
post_office_drop_date. 2021-03-24
- letter - flat - postcard
firstClass standard nonprofit