Skip to content

Instantly share code, notes, and snippets.

View thekavish's full-sized avatar

Kavish Patel thekavish

  • Nuware Systems LLC
  • Bengaluru
  • 19:16 (UTC +05:30)
  • X @thekavish
View GitHub Profile
@thekavish
thekavish / readme.md
Last active October 1, 2022 19:44
Set up file permissions for Laravel

How to set up file permissions for Laravel with current user as owner

I prefer to own all the directories and files (it makes working with everything much easier), so, go to your laravel root directory:

cd /var/www/html/laravel >> assuming this is your current root directory sudo chown -R $USER:www-data .

Then I give both myself and the webserver permissions:

sudo find . -type f -exec chmod 664 {} \;

@thekavish
thekavish / hosts
Last active October 1, 2022 19:44
Virtual host with XAMPP
# Copyright (c) 1993-2009 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
#
@thekavish
thekavish / httpd-vhosts.conf
Created September 29, 2022 18:27
SSL Certificate in localhost
<VirtualHost _default_:443>
DocumentRoot "C:\xampp74\htdocs\myapp\public"
ServerName myapp.test
<Directory "C:\xampp74\htdocs\myapp\public"></Directory>
SSLEngine on
SSLCertificateFile "C:/xampp74/apache/conf/ssl.key/myapp.test.crt"
SSLCertificateKeyFile "C:/xampp74/apache/conf/ssl.key/myapp.test.key"
</VirtualHost>
# Refer -> https://zeropointdevelopment.com/how-to-get-https-working-in-windows-10-localhost-dev-environment/
@thekavish
thekavish / .bashrc
Last active June 28, 2021 10:11
My aliases for git bash terminal
alias art='php artisan'
alias artop='art optimize'
alias qureta='art queue:retry all'
alias tnkr='art tinker'
alias artcl='art op:cl'
alias arts='art serve'
alias top70='cd /e/xampp7.0/htdocs'
alias top73='cd /e/xampp/htdocs'
alias top74='cd /e/xampp7.4/htdocs'
@thekavish
thekavish / .bash_history
Last active April 12, 2022 12:51
LEMP installation on a new ubuntu based PC.
sudo apt update
sudo apt upgrade
sudo apt install nginx -y
sudo systemctl enable nginx
sudo systemctl start nginx
sudo systemctl status nginx
nginx -v
sudo iptables -I INPUT -p tcp --dport 80 -j ACCEPT
sudo ufw allow http

Keybase proof

I hereby claim:

  • I am thekavish on github.
  • I am thekavish (https://keybase.io/thekavish) on keybase.
  • I have a public key ASCoBncjkRDJoXmqx48KkVq-86m3Vx2ISh5ejxOaHoRY-Qo

To claim this, I am signing this object:

@thekavish
thekavish / .htaccess
Last active May 10, 2019 19:19
How to remove /public from Laravel web application
# Add this file in your application root directory
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond $1 !^(index\.php|\.well-known)
RewriteRule ^(.*)$ public/$1 [L]
</IfModule>