The post Autodesk Fusion 360 Using eGPU appeared first on Justin Silver.
]]>Open a Finder window showing the latest version of Fusion 360 in the webdeploy folder.
F360_APP=Autodesk\ Fusion\ 360 F360_WEBDEPLOY="~/Applications/$F360_APP.app/Contents/MacOS/$F360_APP" F360_DIR=$(cat ~/Applications/"$F360_APP".app/Contents/MacOS/"$F360_APP" | grep destfolder | head -n 1 | cut -c 12- | tr -d '"') open -R "$F360_DIR/$F360_APP.app"
Press ⌘ + i
to open the Finder Inspector and check “Prefer External GPU”.
The next time you launch Fusion 360 it should use the external GPU instead of the internal options.
The post Autodesk Fusion 360 Using eGPU appeared first on Justin Silver.
]]>The post OSX Mojave Disappearing Icons Fixed appeared first on Justin Silver.
]]>Icons on my Macbook Pro running OSX Mojave (10.14.6) started disappearing and being replaced with a generic icon in the Dock, Finder, Applications, task switcher, etc… which is pretty annoying as it makes it hard to determine which icon launches which app.
The standard recommendations of restarting the Dock and Finder did not fix the issue for me, nor did rebuilding the launch services database. Ultimately I needed to clear the icon cache, as well as the former items, and then after waiting a bit (and relaunching the applications) the icons appeared as normal.
find "${HOME}/Library/Application Support/Dock" -name "*-*.db" -maxdepth 1 -delete; sudo rm -rf /Library/Caches/com.apple.iconservices.store; sudo find /private/var/folders/ -name com.apple.dock.iconcache -exec rm -rf {} \;; sudo find /private/var/folders/ -name com.apple.iconservices -exec rm -rf {} \;; sudo touch /Applications/*; defaults write com.apple.dock ResetLaunchPad -bool true; killall Dock; killall Finder;
The post OSX Mojave Disappearing Icons Fixed appeared first on Justin Silver.
]]>The post Syscoin Core 3.0 Build Scripts appeared first on Justin Silver.
]]>Use the following commands to compile Syscoin 3.0 on a variety of operating systems. These scripts will prepare your system with the proper build tools and install the necessary libraries and source code to compile binaries on and for your system.
# xcode command line tools xcode-select --install # update brew update # build tools brew install git automake libtool miniupnpc openssl pkg-config protobuf python qt libevent qrencode librsvg # boost brew install boost # berkeleydb 4.8 brew install berkeley-db@4 # miniupnpc brew install miniupnpc # zmq brew install czmq # syscoin git clone https://github.com/syscoin/syscoin.git cd syscoin ./autogen.sh ./configure make -j$(sysctl -n hw.ncpu) -pipe sudo make install
#!/bin/bash # required for libdb4.8 sudo apt install -y software-properties-common sudo add-apt-repository ppa:bitcoin/bitcoin # update sudo apt update -y # build tools sudo apt install -y git build-essential libtool autotools-dev automake pkg-config libssl-dev libevent-dev bsdmainutils python3 # boost sudo apt install -y libboost-all-dev # berkeleydb 4.8 sudo apt install -y libdb4.8-dev libdb4.8++-dev # miniupnpc sudo apt install -y libminiupnpc-dev # zmq sudo apt install -y libzmq3-dev # syscoin git clone https://github.com/syscoin/syscoin.git cd syscoin ./autogen.sh ./configure make -j$(nproc) -pipe sudo make install
#!/bin/bash # required for libdb4.8 sudo apt install -y software-properties-common sudo add-apt-repository ppa:bitcoin/bitcoin # update sudo apt update -y # build tools sudo apt install -y git build-essential libtool autotools-dev automake pkg-config libssl-dev libevent-dev bsdmainutils python3 python-dev # boost 1.65 curl -sL https://dl.bintray.com/boostorg/release/1.65.1/source/boost_1_65_1.tar.gz -o boost_1_65_1.tar.gz tar -xvf boost_1_65_1.tar.gz && pushd boost_1_65_1 ./bootstrap.sh sudo ./b2 cxxflags=-fPIC -a --with=all -j$(nproc) toolset=gcc install popd # berkeleydb 4.8 sudo apt install -y libdb4.8-dev libdb4.8++-dev # miniupnpc sudo apt install -y libminiupnpc-dev # zmq sudo apt install -y libzmq3-dev # syscoin git clone https://github.com/syscoin/syscoin.git cd syscoin ./autogen.sh # must point to newer boost to prevent conflicts! ./configure --with-boost-libdir="/usr/local/lib/" make -j$(nproc) -pipe sudo make install
#!/bin/bash # update sudo apt update -y # build tools sudo apt install -y git build-essential libtool autotools-dev automake pkg-config libssl-dev libevent-dev bsdmainutils python3 # boost sudo apt install -y libboost-all-dev # berkeleydb 4.8 via syscoin contrib source <(curl https://raw.githubusercontent.com/syscoin/syscoin/master/contrib/install_db4.sh) "$(pwd)" export BDB_PREFIX="$(pwd)/db4" # miniupnpc sudo apt install -y libminiupnpc-dev # zmq sudo apt install -y libzmq3-dev # syscoin git clone https://github.com/syscoin/syscoin.git cd syscoin ./autogen.sh ./configure BDB_LIBS="-L${BDB_PREFIX}/lib -ldb_cxx-4.8" BDB_CFLAGS="-I${BDB_PREFIX}/include" make -j$(nproc) -pipe sudo make install
#!/bin/bash # update sudo dnf update -y # build tools sudo dnf install -y git gcc-c++ libtool make autoconf automake openssl-devel libevent-devel python3 # boost sudo dnf install -y boost-devel # berkeleydb 4.8 sudo dnf install -y libdb4-devel libdb4-cxx-devel # miniupnpc sudo dnf install -y miniupnpc-devel # zmq sudo dnf install -y czmq-devel # syscoin git clone https://github.com/syscoin/syscoin.git cd syscoin ./autogen.sh ./configure make -j$(nproc) -pipe sudo make install
#!/bin/bash # update sudo yum update -y # build tools sudo yum install -y git gcc-c++ libtool make autoconf automake epel-release openssl-devel libevent-devel python3 python-devel patch # boost 1.65 curl -sL https://dl.bintray.com/boostorg/release/1.65.1/source/boost_1_65_1.tar.gz -o boost_1_65_1.tar.gz tar -xvf boost_1_65_1.tar.gz && pushd boost_1_65_1 ./bootstrap.sh sudo ./b2 cxxflags=-fPIC -a --with=all -j$(nproc) toolset=gcc link=static runtime-link=static install popd # berkeleydb 4.8 (requires epel-release) sudo yum install -y libdb4-devel libdb4-cxx-devel # upnp (requires epel-release) sudo yum install -y miniupnpc-devel # zmq (requires epel-release) sudo yum install -y czmq-devel # syscoin git clone https://github.com/syscoin/syscoin.git cd syscoin ./autogen.sh ./configure make -j$(nproc) -pipe sudo make install
The post Syscoin Core 3.0 Build Scripts appeared first on Justin Silver.
]]>The post Moving WordPress’ /wp-content/uploads out of your DocumentRoot appeared first on Justin Silver.
]]>Why might you want to move your /wp-content/uploads
folder out of your DocumentRoot? In my case, I use DropBox to sync files between my desktop and my laptop for doing development – no matter where I was working last, my changes, including Subversion status from the hidden .svn
directories, are ready to go on the other computer (assuming I have Internet access of course, but even then DropBox will copy over the local network if it’s available, which means it’s pretty quick at home). For some of my site’s, like this one, there are gigabytes and gigabytes of images in my uploads directory, but they don’t really do that much for me in terms of development, but I still need them.
The solution for me was to move the uploads folder outside of the Apache DocumentRoot
, were it can still be accessed, but doesn’t count against my DropBox usage (and doesn’t suck up bandwidth syncing thumbnail generation and the like.)
My first order of business was to break uploads out into a different SVN path – otherwise it will just update the folder every time you run an “svn up
“. On the production server, you would want to do the following:
# WordPress Files # https://svn.example.com/mysite/web/trunk svn co https://svn.example.com/mysite/web/trunk /var/www/mysite/html # WordPress Uploads # https://svn.example.com/mysite/uploads/trunk svn co https://svn.example.com/mysite/uploads/trunk /var/www/mysite/html/wp-content/uploads # add "uploads" to your svn:ignore in the wp-content folder svn propedit svn:ignore /var/www/mysite/html/wp-content/ svn up /var/www/mysite/html/wp-content/ svn commit -m "saving svn:ignore for uploads" /var/www/mysite/html/wp-content/
And then on your Workstation, the following:
# WordPress Files # https://svn.example.com/mysite/web/trunk svn co https://svn.example.com/mysite/web/trunk ~/Dropbox/MySites/mysite # WordPress Uploads # https://svn.example.com/mysite/uploads/trunk svn co https://svn.example.com/mysite/uploads/trunk ~/Documents/MySites/mysite
I also added the following rules to /etc/subversion/config
on my server and ~/.subversion/config
on my workstation to prevent thumbnails from being added – there are lots of ways these can be regenerated if necessary.
[miscellany] global-ignores = *-[0-9]*x[0-9]*.jpg -[0-9]*x[0-9]*.gif -[0-9]*x[0-9]*.png -[0-9]*x[0-9]*.bmp -[0-9]*x[0-9]*.jpeg
Now in your Apache configuration for your workstation, you need to set an AliasMatch
for the uploads directory so that Apache can serve up these files. I use MAMP running as my user, so I don’t have to worry about permissions, but you should keep this in mind depending on your configuration.
<VirtualHost *:80> DocumentRoot "/Users/justinsilver/Dropbox/MySites/mysite" ServerName local.mysite.com # Reference the uploads folder in your Documents AliasMatch ^/wp-content/uploads/(.*) /Users/justinsilver/Documents/MySites/mysite/wp-content/uploads/$1 <Directory /Users/justinsilver/Dropbox/MySites/mysite> AllowOverride All </Directory> </VirtualHost>
With all of this done, you’re good to go as far as serving files, but WordPress will still be confused when it tries to write to the directory, since it uses an absolute path. To fix this, we can use a static defined in wp-config.php
(which should be different than production anyway, considering you probably had to set overrides for WP_HOME
and WP_SITEURL
plus the local database configuration) and use that to selectively change the path to the uploads directory. Thus, add the absolute path to your wp-config.php like so, on the workstation:
define('WP_DEV_UPLOADS', '/Users/justinsilver/Documents/MySites/mysite/wp-content/uploads');
With this set, add the following to your theme’s functions.php, or your functions plugin (more on this at a different time) to hook to the “upload_dir” and change the uploads directory that WordPress uses.
if (defined('WP_DEV_UPLOADS')){ if (is_dir(WP_DEV_UPLOADS)){ // use directory outside of Dropbox for uploads so they dont go to Dropbox (uses Alias in VirtualHost) function wp_dev_upload_dir($upload_dir){ $upload_dir['path'] = str_replace( $upload_dir['basedir'], WP_DEV_UPLOADS, $upload_dir['path'] ); $upload_dir['basedir'] = WP_DEV_UPLOADS; return $upload_dir; } add_filter('upload_dir', 'wp_dev_upload_dir'); } else { error_log('WP_DEV_UPLOADS is defined but does not exist: ' . WP_DEV_UPLOADS); } }
The post Moving WordPress’ /wp-content/uploads out of your DocumentRoot appeared first on Justin Silver.
]]>The post Disk Util Repair Permissions on Mac OS X Lion RAID 0 appeared first on Justin Silver.
]]>So it turns out that if you have a Mac OS X Lion on RAID 0 that you can’t run Verify/Repair Permissions on your hard drive, at least via Disk Utility. You can however still run from the command line, just enter:
sudo diskutil repairPermissions /
If you want to repair the disk you will have to do so from Single User mode – hold down the Apple ⌘ + S while the system is booting up, then run:
/sbin/fsck -fy sudo fsck_hfs -f /dev/disk4s2
The post Disk Util Repair Permissions on Mac OS X Lion RAID 0 appeared first on Justin Silver.
]]>