-
Apache configuration file
- ubuntu -> /etc/apache2/apache2.conf
- arch -> /etc/httpd/conf/httpd.conf
-
Add mod_rewrite and .htaccess support for your site At the end of the configuration files add these lines:
#My site mod_rewrite configuration <Directory "/var/www/"> AllowOverride All
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
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteRule ^(.*)$ public/$1 [L] | |
</IfModule> |
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
cls | |
@ECHO OFF | |
title Folder Locker | |
if EXIST "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" goto UNLOCK | |
if NOT EXIST Locker goto MDLOCKER |
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
UPDATE tableB | |
INNER JOIN tableA ON tableB.name = tableA.name | |
SET tableB.value = IF(tableA.value > 0, tableA.value, tableB.value) | |
WHERE tableA.name = 'Joe' |
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
SELECT concat('DROP TABLE IF EXISTS `', table_name, '`;') | |
FROM information_schema.tables | |
WHERE table_schema = 'MyDatabaseName'; |
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
navigator.permissions.query({name: 'microphone'}) | |
.then((permissionObj) => { | |
console.log(permissionObj.state); | |
}) | |
.catch((error) => { | |
console.log('Got error :', error); | |
}) | |
navigator.permissions.query({name: 'camera'}) | |
.then((permissionObj) => { |
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
Step 1: | |
sudo vi /etc/mysql/mysql.conf.d/mysqld.cnf | |
Step 2: Go to last line and add the following | |
sql_mode = "" | |
Step 3: Save | |
Step 4: Restart mysql server. |
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
{"keys": ["ctrl+shift+x"], "command": "reindent", "args": {"single_line": false}} |