If you are using the amazing free InstantWP WordPress development package often, then you might start wondering how to properly use it with Git version control. The difficulty is that trying to add the entire Linux Alpine virtual operating system to Git is too heavy, but adding only the contents of the Theme folder will not keep track of your posts and other database related content. I will outline the steps I used to get Git working with IWP below:
Continue reading “How to use Git with InstantWP”Run a simple lightweight Python server
When you are developing websites you often run into the need to test them on a server environment, because browsers block websites with certain features from running locally.
Here is a really quick way to run such a website in a server environment using Python 3 (which you probably have already installed on your machine anyways).
- Open the command window where your website root folder is. One easy way of doing that is simply typing “cmd” in the Windows Explorer address bar.
- Type this command in the command window:
python -m http.server 8000
- Now simply go to http://127.0.0.1:8000/ in your browser.
If you are getting errors regarding script files with that simple version, you can also try this longer code:
python
#Use to create local host
import http.server
import socketserver
PORT = 1337
Handler = http.server.SimpleHTTPRequestHandler
Handler.extensions_map.update({
".js": "application/javascript",
});
httpd = socketserver.TCPServer(("", PORT), Handler)
httpd.serve_forever()
And open that with:
http://127.0.0.1:1337/
Colorize or tint an SVG image with CSS
This is a quick example of how you can tint an svg image even if it’s added to the page externally (it’s not an inline svg):
Continue reading “Colorize or tint an SVG image with CSS”Increment number when creating multiple html elements using emmet
Sometimes you need to create many elements so that each one of them gets a unique, incrementing number. You probably already know about VS Code’s Emmet capabilities which let you type something like .myClass*5 to automatically create five divs with the class “myClass”. So the output of that would be:
Continue reading “Increment number when creating multiple html elements using emmet”How to check paper wallet balance by scanning the QR code with Mycelium
Do you need to verify the balance of a paper wallet but do not feel like manually typing the address to a blockchain explorer?
Continue reading “How to check paper wallet balance by scanning the QR code with Mycelium”How to create SVG image maps with Inkscape.
Unable to enter your WordPress password when trying to log-in? Here is an easy solution.
I recently encountered a problem in which it was impossible to login to the WordPress backend/admin area since the password field was not accepting any input. The same problem occurred on all the browsers I tested it in. It seems like an update might have broken something in a theme or a plugin. Finally there was an easy solution to the problem:
Just open the developer tools of your browser, target the password input field and delete the bit where it says “disabled” from the source code (displayed typically on the right side of you browser window in the Developer tools panel). Now the form field takes input again and you are able to login and update your plugins/theme if needed.
Examples of Brackets plus the Emmet extension
Here’s how the Emmet extension for Brackets can really speed up your workflow:
-type #mydiv and hit tab to get <div id=”mydiv”></div>
-type lorem and hit tab to get lorem ipsum text
-type #container>.col-sm-4*3 and hit tab to get
<div id=”container”>
<div class=”col-sm-4″></div>
<div class=”col-sm-4″></div>
<div class=”col-sm-4″></div>
</div>
How to backup all Google Drive Documents in offline formats
In this video we create backups for all the Google Docs files we have created inside Google Drive:
Written version:
Continue reading “How to backup all Google Drive Documents in offline formats”
Restore a WordPress site with just the Mysql-database file
Here’s how to restore a WordPress site to a new WordPress installation, perhaps at another web host:
1. Create a database, a database user and assign the user to the database. If this is too much trouble, you can use a one click installer as long as you then delete the WordPress installation files (keep a copy of the wp_config-file though) via FTP and drop all the tables from the database (doing this will give you the basic database setup).
2. Download WordPress, unzip and upload the files to the server
3. Go to your web-address and run the installation
4. OPTIONAL: If you have a backup of your old theme, upload the theme folder into the wp-content –> themes -folder and upload the “uploads” folder inside “wp-content” as well.
5. You site should now be up and running!