Cheap Macbook Pro Docking Solution for about $30
I typically prefer developing on my desktop and large dual screen monitor setup as opposed to my Macbook. Recently, I’ve gotten into more PHP development and developing on the Mac is proving to be a more enjoyable experience only because Windows is still a second class citizen for most PHP libraries/tools. I still wanted a larger screen setup, so I considered buying a docking station to hook up to a larger monitor but I soon learned they feature the ‘Mac Penalty’ in that they cost more than they should just because it’s for Apple products.
I already have two large monitors and figured my Macbook could serve as third screen. Then I did some thinking and realized I could use one of the monitors for both computers. Assuming you have two HDMI screens already hooked up to your desktop, this would save you $150+ and still allow you to be more productive.
- Get a copy of Synergy (http://symless.com/) for $10. It’s open source and can be built if you have the time, but a one time fee of $10 saves me the hassle of doing so. With this, you can share your desktop keyboard across all your computers with the one license and it’s cross platform so Linux support is included too.
- Purchase an auto HDMI switcher. I purchased the PORTTA PET0301S 3×1 Port HDMI Switch/Switcher for about $9.
- Be sure to get 2 HDMI cables if you don’t already have them on hand. I don’t like the Amazon Basic brand for these as I’ve had problems with the Mac and those cables hooking up to larger screens.
- Install Synergy on the desktop as a server. Install on the Macbook as a client and it should autoconnect.
- Plug the HDMI cable from the computer into the HDMI switcher, and plug the spare into the Macbook pro. Plug the “Out” end into the monitor.
When you plug your HDMI cable into the Macbook, the HDMI switcher will automatically switch to it and project the Macbook. Synergy will auto-connect as long as it’s running on both and you can share the mouse and keyboard between both and work seamlessly.
If you have an iPad and want to turn that into an additional screen, grab a copy of Duet Display on your desktop/Macbook and install on your iPad for $15.99, and viola, instant portable second screen!
How to fix “hacked by Moroccanwolf” WordPress site
A client of mine had their wordpress hacked and when you would load the site, it would simply display a message that said “hacked by Moroccanwolf”. I did some digging and luckily it wasn’t a major hack and they didn’t mess with the posts or other settings as a lot of the hacks do.
Quick Fix
- To fix it, you’ll need to connect to your database using an editor of some sort, such as PHPmyadmin.
- Once logged in, expand your database on the left.
- Click on ‘wp_options’.
- On the top right, click the ‘Browse’ tab.
- Look for ‘widget_text’ in the option_name field. (For my client, it was at row 90). You should see something similar to this:
<script>document.documentElement.innerHTML = unescape(''%48%61%63%6b%65%64%20%62%79%20%4d%6f%72%6f%63%63%61%6e%77%6f%6c%66%20%26%26%20%61%62%64%65%6c%6c%61%68%20%45%6c%6d%61%67%68%72%69%62%69'');</script>
Delete the entire tag and this should restore your website. Now remember to change your logins and update wordpress.
How I Figured it Out
Most of the hacks I’ve seen are done through injecting javascript into the database somewhere which either force a redirect or something along those lines. Here’s the steps I followed to find it:
- To fix it, you’ll need to connect to your database using an editor of some sort, such as PHPmyadmin.
- Once logged in, click on your database on the left. Ensure you’re on the database and not a table.
- Click Export.
- Leave it to quick and click go.
- You should now see a textbox with a mess of SQL commands.
- Copy and paste into your favorite editor,
- Search for <script> and you should find something that doesn’t belong. In this instance, that was the only thing I found of note.
- You’ll want to scan the rest of the database for things that don’t belong. Additionally, you’ll want to replace all the wordpress files and confirm no .htaccess files were created that give hackers write access.