To disable the autostart of the NCP Secure Entry Mac Client GUI application on a Mac, just edit the /Library/LaunchAgents/com.ncp-e.ncpmon.plist file and set the value "RunAtLoad" to "false" (from "true"). It's faster to do it via command-line, like this: | |
$ sudo nano /Library/LaunchAgents/com.ncp-e.ncpmon.plist | |
Then move the cursor right below the line containing "RunAtLoad" and change true to false. | |
Cmd+X, Y, Enter | |
Ready! |
<?php | |
/** | |
* Drop this into the shell directory in the Magento root and run with -h to see all options. | |
*/ | |
require_once 'abstract.php'; | |
/** | |
* Fix duplicate url keys for categories and products to work with the 1.8 alpha1 CE url key constraints. |
A lot of important government documents are created and saved in Microsoft Word (*.docx). But Microsoft Word is a proprietary format, and it's not really useful for presenting documents on the web. So, I wanted to find a way to convert a .docx file into markdown.
As it turns out, there are several open-source tools that allow for conversion between file types. Pandoc is one of them, and it's powerful. In fact, pandoc's website says "If you need to convert files from one markup format into another, pandoc is your swiss-army knife." But, although pandoc can convert from markdown into .docx, it doesn't work in the other direction.
// SAMPLE ONLY -- DON'T USE FOR REAL STUFF UNLESS YOU'VE REVIEWED AND TESTED :) | |
// Needs work to make robust: check property type's class has default ctor and so on. | |
// Can also filter out interfaces as these will be auto-subbed. | |
public static T SubFor<T>() where T : class | |
{ | |
var gettableVirtualProps = typeof(T).GetProperties() | |
.Where(x => x.CanRead && x.GetGetMethod().IsVirtual) | |
.Select(x => x); | |
var sub = Substitute.For<T>(); |
In your Windows 7/8 VM, go to Control Panel
> System
> Advanced system settings
> Computer Name
and click Change
. Name this whatever you like, e.g. windows. Restart your VM.
Open CMD or Powershell as administrator. Add a URL ACL entry for your new name on the port of your choice, e.g.
netsh http add urlacl url=http://windows:8080/ user=everyone
This launchd script will ensure that your Docker environment on your Mac will have 10.254.254.254 as an alias on your loopback device (127.0.0.1). The command being run is ifconfig lo0 alias 10.254.254.254
Copy/Paste the following in terminal with sudo (must be root as the target directory is owned by root)...
sudo curl -o /Library/LaunchDaemons/com.ralphschindler.docker_10254_alias.plist https://gist.githubusercontent.com/ralphschindler/535dc5916ccbd06f53c1b0ee5a868c93/raw/com.ralphschindler.docker_10254_alias.plist
This script is no longer required with Docker for Mac which includes an option to run Docker at startup and doesn't use docker-machine
to administer the local Docker engine.
- Docker Machine + Docker
- curl
- A Virtualbox-driven Docker Machine called "default"
docker-machine create --driver virtualbox default
(this is the default with Docker toolkit).
<?php | |
/* | |
* This script deletes duplicate images and imagerows from the database of which the images are not present in the filesystem. | |
* It also removes images that are exact copies of another image for the same product. | |
* And lastly, it looks for images that are on the filesystem but not in the database (orphaned images). | |
* | |
* This script can most likely be optimized but since it'll probably only be run a few times, I can't be bothered. | |
* | |
* Place scripts in a folder named 'scripts' (or similar) in the Magento root. |