Mail::send('errors.500', [], function($message)
{
$message->to('[email protected]')->subject('Testing mails');
});
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
# laravel-deployment | |
- [ ] Install apache | |
- `sudo systemctl start apache2`: Manage apache [stop,status,restart,reload,disable,enable] | |
- [Install apache](https://www.digitalocean.com/community/tutorials/how-to-install-the-apache-web-server-on-ubuntu-18-04) | |
- `sudo a2enmod rewrite` enable mod rewrite | |
- `<Directory /var/www/domain.com/public> | |
Options Indexes FollowSymLinks MultiViews | |
AllowOverride All |
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
alias ..="cd .." | |
alias ...="cd ../.." | |
alias h='cd ~' | |
alias c='clear' | |
alias art=artisan | |
alias codecept='vendor/bin/codecept' | |
alias phpspec='vendor/bin/phpspec' | |
alias phpunit='vendor/bin/phpunit' |
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
Just do this: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-key-pairs.html#replacing-lost-key-pair | |
Here is what I did, thanks to Eric Hammond's blog post: | |
Stop the running EC2 instance | |
Detach its /dev/xvda1 volume (let's call it volume A) - see here | |
Start new t1.micro EC2 instance, using my new key pair. Make sure you create it in the same subnet, otherwise you will have to terminate the instance and create it again. - see here | |
Attach volume A to the new micro instance, as /dev/xvdf (or /dev/sdf) | |
SSH to the new micro instance and mount volume A to /mnt/tmp |
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 apt-get update -y | |
sudo apt-get upgrade -y | |
cd ~ | |
sudo fallocate -l 4G /swapfile | |
sudo chmod 600 /swapfile | |
sudo mkswap /swapfile | |
sudo swapon /swapfile | |
sudo sysctl vm.swappiness=10 | |
sudo sysctl vm.vfs_cache_pressure=50 |
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
server { | |
listen 80 default_server; | |
server_name server.com; | |
root "/var/www/server/public"; | |
index index.html index.htm index.php; | |
charset utf-8; | |
location / { |
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
createCounter: function (ref, num_shards) { | |
let batch = db.batch(); | |
// Initialize the counter document | |
batch.set(ref, { num_shards: num_shards }); | |
// Initialize each shard with count=0 | |
for (let i = 0; i < num_shards; i++) { | |
let shardRef = ref.collection('shards').doc(i.toString()); | |
batch.set(shardRef, { count: 0 }); |
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
let algoliasearch = require('algoliasearch'); | |
let client = algoliasearch(process.env.MIX_ALGOLIA_APP_ID, process.env.MIX_ALGOLIA_SECRET); | |
let products = client.initIndex('products'); | |
let ebay_orders = client.initIndex('ebay_orders'); | |
let ebay_products = client.initIndex('ebay_products'); | |
let amazon_orders = client.initIndex('amazon_orders'); | |
let amazon_products = client.initIndex('amazon_products'); | |
$('#magicSearch').autocomplete( |
- Every modification in
.env
file needs to be replicated in.env.example
.
Ex: .env
file is never commited into the repository, So 3rd developer will never know valid values to pass through in .env
.
- If css class can be traced with relationships, Don't introduce a new class.
<ul class="list-holder">
<li class="list-item">Item 1</li>
</ul>
OlderNewer