I hereby claim:
- I am viktorsteinwand on github.
- I am viktorsteinwand (https://keybase.io/viktorsteinwand) on keybase.
- I have a public key whose fingerprint is 8828 2E62 2617 18E1 06E1 ADF2 B0B7 0375 02D9 FB63
To claim this, I am signing this object:
| # Install gnu-sed via brew | |
| brew install gnu-sed | |
| # using it | |
| gsed | |
| Please note: if installing with option "--default-names" it will replaces the default OS X sed command in the shell |
| docker-machine-nfs default --shared-folder=/Users --shared-folder=/private/var/folders |
| #!/bin/bash | |
| web_service='nginx' | |
| config_file="/usr/local/etc/le-renew-webroot.ini" | |
| le_path='/opt/letsencrypt' | |
| exp_limit=30; | |
| if [ ! -f $config_file ]; then | |
| echo "[ERROR] config file does not exist: $config_file" |
I hereby claim:
To claim this, I am signing this object:
| <?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. |
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 create --driver virtualbox default (this is the default with Docker toolkit).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.plistIn 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
| // 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>(); |