Skip to content

Instantly share code, notes, and snippets.

View dejanmarkovic's full-sized avatar
💭
WordPress development 24/7

Dejan Markovic dejanmarkovic

💭
WordPress development 24/7
View GitHub Profile
@dejanmarkovic
dejanmarkovic / 0_reuse_code.js
Created November 3, 2013 16:04
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@dejanmarkovic
dejanmarkovic / new_gist_file
Created November 5, 2013 15:18
Setting Xdebug within Xampp on Windows
[XDebug]
zend_extension = "C:\xampp\php\ext\php_xdebug.dll"
;xdebug.profiler_append = 0
;xdebug.profiler_enable = 1
;xdebug.profiler_enable_trigger = 0
;xdebug.profiler_output_dir = "C:\xampp\tmp"
;xdebug.profiler_output_name = "cachegrind.out.%t-%s"
xdebug.remote_enable = 1
xdebug.remote_handler = "dbgp"
xdebug.remote_host = "127.0.0.1"
@dejanmarkovic
dejanmarkovic / new_gist_file
Created November 5, 2013 15:27
Xdebug checker
copy/pate phpinfo information into this form
http://xdebug.org/wizard.php
@dejanmarkovic
dejanmarkovic / new_gist_file
Created November 5, 2013 15:39
Configuting PHP installation
Go here https://www.jetbrains.com/phpstorm/webhelp/enabling-php-support.html#configure_php_at_product_level
@dejanmarkovic
dejanmarkovic / new_gist_file
Created November 5, 2013 15:40
Integrating XDebug with PhpStorm
https://www.jetbrains.com/phpstorm/webhelp/configuring-xdebug.html
[XDebug]
zend_extension = "C:\xampp\php\ext\php_xdebug.dll"
;xdebug.profiler_append = 0
;xdebug.profiler_enable = 1
;xdebug.profiler_enable_trigger = 0
;xdebug.profiler_output_dir = "C:\xampp\tmp"
;xdebug.profiler_output_name = "cachegrind.out.%t-%s"
xdebug.remote_enable = 1
@dejanmarkovic
dejanmarkovic / new_gist_file
Created November 7, 2013 15:35
Get upload dir location variable
$upload_dir = wp_upload_dir();
$upluad_url = $upload_dir['baseurl'];
@dejanmarkovic
dejanmarkovic / new_gist_file
Created November 7, 2013 23:05
Import MySql database from command line
mysql -p -u root dbname < dbname.sql
@dejanmarkovic
dejanmarkovic / new_gist_file
Created November 13, 2013 15:42
Changing MySQL password in Xampp
I. First disable grant tables
stop the MySQL service through Administrator tools, Services.
Modify the my.ini configuration file (assuming default paths) located in C:\xampp\mysql\bin
In the SERVER SECTION, under [mysqld], add the following line:
skip-grant-tables
... so that you have
# SERVER SECTION
# ----------------------------------------------------------------------
@dejanmarkovic
dejanmarkovic / new_gist_file
Created November 13, 2013 16:24
Changin password for phpMyAdmin in Xampp on Windows
1. Go to C:\xampp\phpMyAdmin\config.inc.php
2. change password here $cfg['Servers'][$i]['password']='root';
@dejanmarkovic
dejanmarkovic / new_gist_file
Created November 13, 2013 19:31
Adding virtual hosts to apache
1. Launch Notepad++ and open the hosts file located at C:\windows\system32\drivers\etc\hosts.
127.0.0.1 name_of_your_site
2.In Notepad++ open the Apache configuration file located at C:\xampp\apache\conf\extra\httpd-vhosts.conf
<VirtualHost *>
DocumentRoot "C:\xampp\htdocs"
ServerName localhost
</VirtualHost>
<VirtualHost *>