Skip to content

Instantly share code, notes, and snippets.

View maliMirkec's full-sized avatar
🤘
I’m really good at this without realising how.

Silvestar Bistrović maliMirkec

🤘
I’m really good at this without realising how.
View GitHub Profile
@maliMirkec
maliMirkec / bitnami-apps-prefix.conf
Created May 16, 2016 20:48
Bitnami WAMP Wordpress vhosts fix.
# Bitnami applications installed in a prefix URL
Include "C:/Workspace/Bitnami/apps/phpmyadmin/conf/httpd-prefix.conf"
Include "C:/Workspace/Bitnami/apps/wordpress/conf/httpd-prefix.conf"
@maliMirkec
maliMirkec / server
Last active March 2, 2016 08:06
Set up server
https://github.com/DigitalOcean-User-Projects/Articles-and-Tutorials/blob/master/set_hostname_fqdn_on_ubuntu_centos.md
https://www.digitalocean.com/community/articles/how-to-set-up-a-host-name-with-digitalocean
https://www.digitalocean.com/community/tutorials/how-to-use-an-spf-record-to-prevent-spoofing-improve-e-mail-reliability
https://www.digitalocean.com/community/tutorials/how-to-install-and-configure-dkim-with-postfix-on-debian-wheezy
@maliMirkec
maliMirkec / phpmyadmin_fix
Last active July 6, 2016 07:09
Fix phpmyadmin controluser message
curl -O -k https://raw.githubusercontent.com/skurudo/phpmyadmin-fixer/master/pma-ubuntu.sh && chmod +x pma-ubuntu.sh && ./pma-ubuntu.sh
@maliMirkec
maliMirkec / my.sql
Created November 26, 2015 10:29
Useful sql commands: reinstall, reset password
// mysql version
apt-cache policy mysql-server
// mysql reconfig
sudo dpkg-reconfigure mysql-server-*.*
// phpmyadmin reconfig
sudo dpkg-reconfigure phpmyadmin
@maliMirkec
maliMirkec / count_files
Created November 3, 2015 07:38
Count nubmer of files in folder
// Count nubmer of files in folder
find FOLDER_NAME -type f | wc -l
@maliMirkec
maliMirkec / replace_string.sql
Last active October 27, 2015 17:58
Replace string in database
UPDATE table_name
SET column_name = REPLACE(column_name, 'old_string_part', 'new_string_part');
@maliMirkec
maliMirkec / sendfile
Last active October 23, 2015 13:35
Turn off sendfile option if you see strange characters in your assets files using vagrant and virtual box
// http://stackoverflow.com/questions/9479117/vagrant-virtualbox-apache2-strange-cache-behaviour
// Apache
EnableSendfile off
// nging
sendfile off
@maliMirkec
maliMirkec / wp-install
Created October 15, 2015 12:09
Wordpress installation on Ubuntu
// connect to database
mysql -u root
// create new database for wp
CREATE DATABASE wordpress;
// check database user in vesta cp
// grant database user all privileges for wp database, admin_default is database user by default
GRANT ALL PRIVILEGES ON wordpress.* TO admin_default@localhost;
@maliMirkec
maliMirkec / folder-size
Created October 14, 2015 18:58
Display size of the folder
// display size of the folder
du -hs /path/to/directory
@maliMirkec
maliMirkec / jpegoptim
Last active May 27, 2016 08:11
Optimize images using jpegoptim script
// optime jpegs in folder
jpegoptim *.jpg —strip-all
// optimize jpegs recursivelly
find -type f -name "*.jpg" -exec jpegoptim --strip-all {} \;