git reset --hard HEAD
Tuesday, December 27, 2016
Git error: Your local changes to the following files would be overwritten by merge
To fix this error type:
Thursday, December 22, 2016
Nginx block default
server {
return 404;
}
Sunday, November 13, 2016
SQL select where join not existed; Select where can't join
SELECT t1.ID
FROM Table1 t1
LEFT JOIN Table2 t2 ON t1.ID = t2.ID
WHERE t2.ID IS NULL
source: http://stackoverflow.com/a/4076157/1767461
Wednesday, October 5, 2016
Installing mail (sendmail) Ubuntu 16
sudo apt-get install sendmailAnd now you can send mails easy with tls enabled without any other bullshit configs
Monday, October 3, 2016
Laravel 5.3 Nginx Config
server {
listen 80;
listen [::]:80;
root /var/www/laravel/public;
index index.php index.html index.htm;
server_name my_app.dev;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/run/php/php7.0-fpm.sock;
}
location ~ /\.ht {
deny all;
}
Sunday, October 2, 2016
Reload MySql
This should work on ubuntu 18.04
If not you can try other commands:
sudo service mysql restart
sudo systemctl restart mysqld
sudo systemctl restart mysql
orsudo service mysqld restart
sudo service mysql restart
orsudo /etc/init.d/mysql reload
or
sudo /etc/init.d/mysql force-reload
Change Auto Increment counter in MySQL
ALTER TABLE tbl AUTO_INCREMENT=310;
Subscribe to:
Posts (Atom)