Recently we had to add a expand collapse icons for the navigation menu on mobile devices in our WordPress theme. We can not use pseudo-classes :after and :before as they are not part of the dom and any events registered on them won’t work. So for our mobile menus, we added a <span> tag like
jQuery/Javascript click event not working on and elements in iOS Safari webkitOpen Chrome Without Address bar in Incognito Mode from Terminal
I often have to take screenshots of my WordPress themes and other products, and the look better when they have a browser frame around it. For this I open chrome without address bar and use the Mac OSX shortcuts CMD+Shit+4 + Spacebar to take the window screenshot with nice shadow. Here are the commands to
How to enable auto complete for git commands and branches on Mac OSX terminal / Command line
If you want to enable tab auto complete at the command line on Mac OSX terminal, there is a handy auto-completion script you can use. https://github.com/git/git/blob/master/contrib/completion/git-completion.bash Using git-completion script to enable auto complete for GIT commands Download and save the git-completion script to your home directory curl https://raw.githubusercontent.com/git/git/master/contrib/completion/git-completion.bash -o ~/.git-completion.bash Then open the .bash_profile file
2 Common errors while setting up phpMyAdmin on Mac OSX
You might encounter the following two errors while installing phpMyAdmin on OSX Login without password is forbidden by the configuration ( See AllowNoPassword ) #2002 can not login tot the MySQL server Here are the fixes for the above two errors. 1. Open phpMyAdmin configuration located at (phpMyAdmin Folder)/config.inc.php and change $cfg[‘Servers’][$i][‘AllowNoPassword’] = False; to
Unable to connect mysql on OSX form PHP
If you are unable to connect to mysql from PHP and you are sure that MYSQL is running, then try changing your host name from localhost to 127.0.0.1
Mongod error | exception in initAndListen std::exception: locale::facet::_S_create_c_locale name not valid
I got this error while trying to start mongodb on amazon ec2. Running this command in the terminal solved the problem. export LC_ALL=C I don’t have any idea about what it means at this time except that it sets the terminal to display all languages. If you can explain what actually it does, please drop
Where is httpd.conf file in Mac OSX Lion
On mac httpd.conf file is located in the directory /etc/apache2/. You can access it through terminal if you want to navigate to it through finder, on finder toolbar goto go->go to folder and type in /etc/apache2
Make command not found in Mac OSX
If you get a -bash: make: command not found error while trying to compile from source, you have to install xcode and then in xcode goto preferences->downloads and install xcode developer tools Download Xcode I’m not sure if you can install command lines without xcode. I can not test as I already have Xcode on
Open Chrome Without Address bar in Incognito Mode from Terminal
I often have to take screenshots of my WordPress themes and other products, and the look better when they have a browser frame around it. For this I open chrome without address bar and use the Mac OSX shortcuts CMD+Shit+4 + Spacebar to take the window screenshot with nice shadow. Here are the commands to
How to enable auto complete for git commands and branches on Mac OSX terminal / Command line
If you want to enable tab auto complete at the command line on Mac OSX terminal, there is a handy auto-completion script you can use. https://github.com/git/git/blob/master/contrib/completion/git-completion.bash Using git-completion script to enable auto complete for GIT commands Download and save the git-completion script to your home directory curl https://raw.githubusercontent.com/git/git/master/contrib/completion/git-completion.bash -o ~/.git-completion.bash Then open the .bash_profile file
2 Common errors while setting up phpMyAdmin on Mac OSX
You might encounter the following two errors while installing phpMyAdmin on OSX Login without password is forbidden by the configuration ( See AllowNoPassword ) #2002 can not login tot the MySQL server Here are the fixes for the above two errors. 1. Open phpMyAdmin configuration located at (phpMyAdmin Folder)/config.inc.php and change $cfg[‘Servers’][$i][‘AllowNoPassword’] = False; to
Unable to connect mysql on OSX form PHP
If you are unable to connect to mysql from PHP and you are sure that MYSQL is running, then try changing your host name from localhost to 127.0.0.1
Mongod error | exception in initAndListen std::exception: locale::facet::_S_create_c_locale name not valid
I got this error while trying to start mongodb on amazon ec2. Running this command in the terminal solved the problem. export LC_ALL=C I don’t have any idea about what it means at this time except that it sets the terminal to display all languages. If you can explain what actually it does, please drop
Where is httpd.conf file in Mac OSX Lion
On mac httpd.conf file is located in the directory /etc/apache2/. You can access it through terminal if you want to navigate to it through finder, on finder toolbar goto go->go to folder and type in /etc/apache2
Make command not found in Mac OSX
If you get a -bash: make: command not found error while trying to compile from source, you have to install xcode and then in xcode goto preferences->downloads and install xcode developer tools Download Xcode I’m not sure if you can install command lines without xcode. I can not test as I already have Xcode on