Windows
-
Using gulp to make your WordPress site runs faster
First of all, what is gulp? It’s open software, a task runner build on node.js. Maybe it isn’t very descriptive, so let’s jump into an example. When I build a theme or a plugin for WordPress, I use many CSS, less, scss, javascript files. For WordPress theme it may be: /src/less/basic.less /src/less/main.less /src/css/default-wp.css /src/css/theme-a.css /src/css/theme-b.css /src/css/responsive.css Now, I need those files in my theme, so I use wp_enqueue_scripts hook and then… No, I do not use wp_enqueue_style for each file (including .less compilation somewhere). So, what do I do? I use one single file, let’s call it my-theme.min.css. Just one file, one HTTP call (it may be a bit outdated…
-
Removing same part of the file in Windows
Once upon the time… All right, it was yesterday. I had to clean up some site, than someone build long time ago. There was an image library, it contains hundreds of images. And it is ok, but all of the images contains “image_” prefix. And all of the images are in /images folder. Unnecessary redundancy I though to myself and I decided to remove “image_” prefix for all image files. And I almost open PHP editor to write short script… And then I thought – damn, we’ve got shell here, it’s Windows! So I opened Windows PowerShell and wrote something like this: PS C:\server\sites\old-site\images> get-childitem | foreach { rename-item $_…
-
Symbolic links – test your themes and plugins
Symbolic links are great feature in Linux/Unix. Mac has this feature even in its GUI. Many of you knows that Windows can handle symbolic links too. But there are some people that doesn’t know about this feature or doesn’t care because they didn’t think about its power. Of course I’m not gonna to write about symbolic links just for symbolic links. We will use it in real life, for our projects. First of all, I will share one of my computers configuration with you. My first hard drive is 960GB SSD. I use it for my operating system (Windows 7 Pro), programs and local server. Server is stored in C:\server\.…