Weston Miller's blog https://kk6mrp.com/ Thu, 12 Dec 2024 20:34:09 +0000 Thu, 12 Dec 2024 20:34:09 +0000 Pico 3D Systems CubeX to RepRap Conversion <h2>3D Systems CubeX to RepRap Conversion</h2> <p><em>April 11, 2020</em></p> <h3>Electronics</h3> <p>The controller has been replaced with an Arduino Mega 2560 outfitted with a RAMPS 1.4 board and the screen has been replaced with a RepRapDiscount Full Graphic Smart Controller. The stepper motors are all still original.</p> <p><a href="https://reprap.org/wiki/RAMPS_1.4">https://reprap.org/wiki/RAMPS_1.4</a></p> <p><a href="https://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller">https://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller</a></p> <h3>Extruder</h3> <p>The stock extruder has been replaced with the much more trouble free E3D V6 Hotend.</p> <p><a href="https://e3d-online.com/v6-all-metal-hotend">https://e3d-online.com/v6-all-metal-hotend</a></p> <h3>Build Platform</h3> <p>I have replaced the included glass build platform with a heated bed covered with an adhesive PEI sheet. The heated bed consists of a 12 x 12 &quot; 1/4 &quot; thick milled aluminum plate with a flexible silicon heater underneath controlled by a solid state relay with the standard E3D Cartridge Thermistor.</p> <p>Aluminum Plate - <a href="https://www.mcmaster.com/9057k17">https://www.mcmaster.com/9057k17</a></p> <p>Silicon Heater - <a href="https://www.mcmaster.com/35765k613">https://www.mcmaster.com/35765k613</a></p> <p>PEI Sheet - <a href="https://www.mcmaster.com/3697n36">https://www.mcmaster.com/3697n36</a></p> <p>E3D Cartridge Thermistor - <a href="https://e3d-online.com/thermistor-cartridge">https://e3d-online.com/thermistor-cartridge</a></p> <h3>Firmware</h3> <p>The firmware is Marlin 2.0 set up for the new extruder, heated bed, and calibrated for the stepper motors.</p> <p>The M92 Calibrated Step Settings are: X87.53 Y87.42 Z1084.79 E80.12</p> <p>Currently I have disabled the display as it was acting strange powering off / preventing the controller from powering on.</p> <p>You may download the current firmware below:</p> <p><a href="http://kk6mrp.com/assets/CubeXFirmware.zip">http://kk6mrp.com/assets/CubeXFirmware.zip</a></p> Sat, 11 Apr 2020 00:00:00 +0000 https://kk6mrp.com/CubeX https://kk6mrp.com/CubeX Setting up Alpine Linux <h1>Setting Up Alpine Linux</h1> <p><a href="https://wiki.alpinelinux.org/wiki/Tutorials_and_Howtos">https://wiki.alpinelinux.org/wiki/Tutorials_and_Howtos</a></p> <p>New Server Checklist: <a href="https://drewdevault.com/new-server">https://drewdevault.com/new-server</a></p> <h3>Setting Up Users and Permissions</h3> <p><a href="https://flak.tedunangst.com/post/doas-mastery">https://flak.tedunangst.com/post/doas-mastery</a></p> <p>“Unix never says please.” – Rob Pike</p> <p>The real intent of <code>sudo</code> is to enable the root user to delegate to one or two non-root users, access to one or two specific privileged commands that they need on a regular basis. The reasoning behind this is that of the lazy sysadmin; allowing the users access to a command or two that requires elevated privileges and that they use constantly, many times per day, saves the SysAdmin a lot of requests from the users and eliminates the wait time that the users would otherwise experience. But most non-root users should never have full root access, just to the few commands that they need.</p> <p><a href="https://www.redhat.com/sysadmin/sysadmins-dont-sudo">https://www.redhat.com/sysadmin/sysadmins-dont-sudo</a></p> <p><a href="https://kifarunix.com/run-only-specific-commands-with-sudo-in-linux/">https://kifarunix.com/run-only-specific-commands-with-sudo-in-linux/</a></p> <p><a href="https://www.atrixnet.com/allow-an-unprivileged-user-to-run-a-certain-command-with-sudo/">https://www.atrixnet.com/allow-an-unprivileged-user-to-run-a-certain-command-with-sudo/</a></p> <p><a href="https://www.2daygeek.com/allow-permit-normal-user-group-to-run-certain-particular-commands-as-root-with-sudo/">https://www.2daygeek.com/allow-permit-normal-user-group-to-run-certain-particular-commands-as-root-with-sudo/</a></p> <p><a href="https://ostechnix.com/add-delete-and-grant-sudo-privileges-to-users-in-alpine-linux/">https://ostechnix.com/add-delete-and-grant-sudo-privileges-to-users-in-alpine-linux/</a></p> <p><a href="https://wiki.alpinelinux.org/wiki/Setting_up_a_new_user">https://wiki.alpinelinux.org/wiki/Setting_up_a_new_user</a></p> <h3>Enabling Repositories</h3> <pre><code class="language-bash">cat &gt; /etc/apk/repositories &lt;&lt; EOF http://dl-cdn.alpinelinux.org/alpine/v$(cat /etc/alpine-release | cut -d'.' -f1,2)/main http://dl-cdn.alpinelinux.org/alpine/v$(cat /etc/alpine-release | cut -d'.' -f1,2)/community EOF</code></pre> <p>Then update your repositories:</p> <pre><code class="language-bash">apk update</code></pre> <h3>apk Package Manager</h3> <h5>Side note: a great place to find packages is <a href="pkgs.org">https://pkgs.org/</a></h5> <p>Install a package with:</p> <pre><code class="language-bash">apk add packagename</code></pre> <p>Remove a package with:</p> <pre><code class="language-bash">apk del packagename</code></pre> <p>List installed packages with:</p> <pre><code class="language-bash">apk info</code></pre> <h3>OpenRC</h3> <p><a href="https://wiki.alpinelinux.org/wiki/Alpine_Linux_Init_System">https://wiki.alpinelinux.org/wiki/Alpine_Linux_Init_System</a></p> <h3>Firewall</h3> <p><a href="https://wiki.alpinelinux.org/wiki/How-To_Alpine_Wall">https://wiki.alpinelinux.org/wiki/How-To_Alpine_Wall</a></p> <p><a href="https://wiki.alpinelinux.org/wiki/Uncomplicated_Firewall">https://wiki.alpinelinux.org/wiki/Uncomplicated_Firewall</a></p> <h3>Tailscale</h3> <pre><code class="language-bash">apk add tailscale --repository=http://dl-cdn.alpinelinux.org/alpine/edge/testing/</code></pre> <h3>NSD</h3> <pre><code class="language-bash">apk add nsd</code></pre> <p>Start and install service:</p> <pre><code class="language-bash">rc-service nsd start // Starts service rc-update add nsd // Starts service on startup</code></pre> <p>Validate DNS Settings at <a href="https://intodns.com/">https://intodns.com/</a> or <a href="https://dnsinspect.com/">https://dnsinspect.com/</a></p> <p>Tip: If you are using a Hotspot, don't forget to clear DNS cache on that too!</p> <p><a href="https://calomel.org/nsd_dns.html">https://calomel.org/nsd_dns.html</a></p> <p><a href="https://drewdevault.com/2016/12/06/A-broad-intro-to-networking.html">https://drewdevault.com/2016/12/06/A-broad-intro-to-networking.html</a></p> <p><a href="https://www.netmeister.org/blog/dns-rrs.html">https://www.netmeister.org/blog/dns-rrs.html</a></p> <h3>Apache2</h3> <pre><code class="language-bash">apk add apache2 apache2-proxy apache2-ssl</code></pre> <p>Start and install service:</p> <pre><code class="language-bash">rc-service apache2 start // Starts service rc-update add apache2 // Starts service on startup</code></pre> <p>Uncomment the following in /etc/apache2/httpd.conf to enable mod_rewrite</p> <pre><code class="language-bash">#LoadModule rewrite_module modules/mod_rewrite.so</code></pre> <p>Then to apply your settings:</p> <pre><code class="language-bash">rc-service apache2 restart</code></pre> <h3>Uacme - SSL Certificates</h3> <p>This is way too easy for the amount of time it took to figure out.</p> <pre><code class="language-bash">apk add uacme mkdir /etc/ssl/uacme.d/ uacme -v -c /etc/ssl/uacme.d new uacme -v -c /etc/ssl/uacme.d issue kk6mrp.com *.kk6mrp.com</code></pre> <p>If you don't get the dns-01 challenge right off, press any key but 'y' and then enter.</p> <p>You can then press Ctrl+Z to put that process in the background.</p> <p>Create the following DNS record substituting key_auth for the key provided in the ACME Challenge:</p> <pre><code class="language-bash">_acme-challenge IN TXT "key_auth"</code></pre> <p>Save and reload NSD:</p> <pre><code class="language-bash">rc-service nsd stop rc-service nsd start</code></pre> <p>Enter 'fg' to return to the uacme process and type 'y' followed by return to finish the challenge.</p> <p>The resulting certificate files will be located here if the challenge completes successfully:</p> <pre><code class="language-bash">/path/to/uacme.d/kk6mrp.com/cert.pem /path/to/uacme.d/private/kk6mrp.com/key.pem</code></pre> <h3>PHP</h3> <pre><code class="language-bash">apk add php7 php7-pdo php7-apache2 php7-sqlite3 php7-gd php7-json php7-session php7-ctype</code></pre> <p>Increase the maximum upload file size from 2 Mb to 5 Mb in /etc/php7/php.ini</p> <pre><code class="language-bash">upload_max_filesize = 2M</code></pre> <p>Then to apply your settings:</p> <pre><code class="language-bash">rc-service apache2 restart</code></pre> <h3>PHP-FPM</h3> <p><a href="https://wiki.alpinelinux.org/wiki/Apache_with_php-fpm">https://wiki.alpinelinux.org/wiki/Apache_with_php-fpm</a></p> <h3>SQLite</h3> <pre><code class="language-bash">apk add sqlite</code></pre> <h3>Vim</h3> <pre><code class="language-bash">apk add vim</code></pre> <h3>Wordpress</h3> <p>To set up wordpress, download the latest version and extract:</p> <pre><code class="language-bash">curl -O https://wordpress.org/latest.tar.gz tar -zxf latest.tar.gz</code></pre> <p>Copy <a href="https://github.com/aaemnnosttv/wp-sqlite-db">db.php</a> to wordpress/wp-content/db.php and remember to change ownership to the webserver user.</p> <p>If you encounter the following error:</p> <pre><code>Your PHP installation appears to be missing the MySQL extension which is required by WordPress.</code></pre> <p>you will need to install &quot;php7-pdo_mysql&quot;</p> <pre><code class="language-bash">apk add php7-pdo_mysql</code></pre> <p>and then to fix:</p> <pre><code>PDO Driver for SQLite is missing. Your PHP installation appears not to have the right PDO drivers loaded. These are required for this version of WordPress and the type of database you have specified.</code></pre> <p>you will presumably need to install &quot;php7-pdo_sqlite&quot; but the last time I tried this I spent six hours trying to get it going only for it to start working on its own :/</p> <pre><code class="language-bash">apk add php7-pdo_sqlite</code></pre> <p>Then to apply your settings:</p> <pre><code class="language-bash">rc-service apache2 restart</code></pre> <h3>Webmail</h3> <p><a href="https://sr.ht/~migadu/alps/">https://sr.ht/~migadu/alps/</a></p> <p><a href="https://cypht.org/">https://cypht.org/</a></p> <h3>Filestash</h3> <p>Install Docker, download docker compose, install and run</p> <pre><code class="language-bash">apk add docker docker-compose addgroup username docker rc-update add docker boot service docker start docker-compose pull docker-compose up -d</code></pre> <h3>Grafana</h3> <pre><code class="language-bash">doas apk add grafana gcompat</code></pre> <p>To edit configuration you'll want /etc/grafana.ini</p> <h3>Networking with iwd</h3> <p><a href="https://gist.github.com/pojntfx/d323ade1305098d306980363237023ec">https://gist.github.com/pojntfx/d323ade1305098d306980363237023ec</a></p> <p>To set up iwd, make sure the wpa_supplicant and networking services are disabled, then perform the following:</p> <pre><code class="language-bash">apk add iwd dbus echo "[General]\nEnableNetworkConfiguration=true" &gt;&gt; /etc/iwd/main.conf rc-service iwd start rc-service dbus start rc-update add iwd boot rc-update add dbus default</code></pre> <p>To connect to a network use the following command:</p> <pre><code class="language-bash">iwctl station wlan0 connect "SSID"</code></pre> <p>Or to connect to a hidden network use:</p> <pre><code class="language-bash">iwctl station wlan0 connect-hidden "SSID"</code></pre> <h3>Task Management</h3> <pre><code class="language-bash">doas apk add btop</code></pre> <h3>Creating Packages</h3> <p><a href="https://wiki.alpinelinux.org/wiki/Creating_an_Alpine_package">https://wiki.alpinelinux.org/wiki/Creating_an_Alpine_package</a></p> Mon, 02 Aug 2021 00:00:00 +0000 https://kk6mrp.com/alpine https://kk6mrp.com/alpine Buying a Home <p><em>This guide is California centric; the process you experiance in other areas may vary.</em></p> <p>In January 2024 I purchased my first home after discovering that there were few options to rent that didn't cost me an arm and a leg. November 15, 2023 I reached out to the realtor, got pre-approved, and looked around at five or so homes, then jumped into making an offer on December 12<sup>th</sup>, and closed on January 5<sup>th</sup>!</p> <p>During this time I felt I was signing papers left and right while not really having the foggiest idea what I was doing. This is a short guide containing the key points of the home buying proces: most of which were not immediately obvious to me at the time. For you, the new homebuyer, it is in your best interest to get a realtor that you can trust in advising you through this process.</p> <h3>Lender</h3> <ul> <li>I used <a href="https://www.scenicoaks.com/">Scenic Oaks Funding</a> at the recommendation of my realtor. The rate seemed to me to be much higher than online lenders, but I do not think I could have purchased a home, especially in the timeline I did, if I had tried going with them.</li> <li>It really is the best if the lender is local and has a relationship with your realtor. There is a certain amount of talk that goes on behind the scenes, and you having a lender with an unknown reputation has a much higher possibility of sinking a deal. Your agent and the seller may not want to go through the work to get a deal that has a much higher change of falling through. <a href="https://kandaproperties.com/blog/online-lenders-what-you-need-to-know">https://kandaproperties.com/blog/online-lenders-what-you-need-to-know</a></li> <li>As far as online lenders are concerned, I would use <a href="https://www.aimloan.com/">AimLoan</a> and work with one of their loan officers when refinancing. Mileage may vary when financing a house.</li> </ul> <h3>Pre-Approval letter</h3> <ul> <li>Get one for the highest amount you can or want to afford.</li> <li>Your lender wants to see less than 45% DTI (debt to income ratio), I'm told this used to be lower. You will need to submit the following documents: <ul> <li>Two months of bank statements showing &quot;seasoned&quot; money to prove that someone didn't just give it to you.</li> <li>Two Years of W-2 forms</li> <li>Last 30 days of paystubs</li> </ul></li> <li>When you make an offer, or counter-offer, you'll need your realtor to send an updated approval letter to the seller with the offer amount. Your agent will likely be used to working directly with the lender on this, and will request updated approval letters when needed.</li> <li>If you pay less than 20% down, you may get a cheaper rate, but you'll have to pay PMI which really can't be removed without a refinance.</li> </ul> <h3>Realtor</h3> <ul> <li>It is in your best interest to have a realtor with a good reputation that knows the area and other realtors around.</li> <li>You're paying enough money in commission that you might as well pay it to someone you know.</li> <li>Get your pre-approval letter to your realtor and start looking at homes!</li> <li>Try to look around at as many homes as you can before making an offer. The more you look at, the more confident you will feel about your decision to place an offer on a house.</li> </ul> <h3>Making an offer</h3> <ul> <li>California favors the buyer, so there are a lot of ways to exit a contract once one is made.</li> <li>Select Contingencies (less is better in competitive market) and timeframe to remove them - we did 10 days.</li> <li>Initial Deposit Amount/Earnest Money - Roughly 1-3% of purchase price into Escrow due within (3 days) of offer acceptance (they keep it if you leave the contract, otherwise goes towards down payment).</li> <li>Select all items that look like they are coming with the house, refrigerator, mirrors in bathrooms, etc...</li> </ul> <h3>Contingencies</h3> <ul> <li>Select Contingencies <ul> <li>Inspections - Home, Roof, and Pest Inspection, and any others if you want</li> <li>Mortgage Contingency</li> <li>Title Contingency</li> <li>Appraisal Contingency</li> <li>Homeowners Insurance Contingency</li> </ul></li> <li>As contingencies are removed, your realtor may send you a contingency removal form to sign which gets sent to the seller.</li> <li>Your realtor should be able to schedule inspections for you and open up the house, etc... Give him a check to pay for it...</li> </ul> <h3>Counter Offer</h3> <ul> <li>You have 3 days to respond; raise offer amount or change of terms if needed.</li> <li>You can ask the seller if they will split the costs of resolving costs for the roof and pest inspection (send them with the counteroffer).</li> </ul> <h3>Loan Approval Process</h3> <ul> <li>As your loan progresses beyond pre-approval, expect them to keep sending you Disclosure Packages to sign as they draw loan documents and finalize closing costs including title insurance, estimated tax, homeowners insurance, etc.</li> <li>You will likely need to send new paystubs and more bank statements to prove your money and income has stayed stable since you got the pre-approval letter.</li> <li>I did not incorporate property tax and homeowners insurance although you can get cheaper rates if you do.</li> <li>Once your loan gets &quot;Clear to Close&quot; approval, they will schedule a date with a notary and prepare loan documents foy you to sign.</li> </ul> <h3>Title Insurance</h3> <ul> <li>Articles I've read indicate that this is mostly a scam. I paid for title insurance however, the title was very clean and was probably unnecessary looking back.</li> <li><a href="https://www.bitsaboutmoney.com/archive/working-title-insurance/">https://www.bitsaboutmoney.com/archive/working-title-insurance/</a></li> <li><a href="https://www.texasobserver.org/entitled-to-profit-in-texas-title-insurance-is-a-total-scam/">https://www.texasobserver.org/entitled-to-profit-in-texas-title-insurance-is-a-total-scam/</a></li> </ul> <h3>Homeowners Insurance</h3> <ul> <li>You basically have two options or less depending on where the house is: AAA or the California Fair Plan (overpriced state home insurance).</li> </ul> <h3>Signing Day and Closing</h3> <ul> <li>Get ready to sign all the papers you already signed all over again and all at once with the notary. (I'm not sure how this would work with using an online lender)</li> <li>After signing, you need to wire the remaining down payment and closing costs to the escrow account.</li> <li>After the escrow account receives your wired funds, the home purchase will close soon after and you will get the keys! (for me, two days after signing, one day after wiring funds)</li> </ul> <h3>Gotchas</h3> <ul> <li>Expect a transfer of servicing right after you buy the house. After you sign the documents, the lender will likely sell the mortgage and the new lender will reach out to you in enough time to pay the first payment.</li> <li>Expect Supplemental Taxes about 6 months after you purchase the house. You are basically paying a one year difference of the new taxes based off the new appraisal vs the old taxes the last owner was paying.</li> </ul> <h3>Other things</h3> <ul> <li>Your realtor might try to sell you on a home warranty which is basically an upfront payment for a year warranty on the AC and other miscellaneous things. I was first under the impression that the seller pays for it. Later I learned that if I wanted it, I would be paying for it. After reviewing the value for the cost, I decided it wasn't worth it.</li> </ul> Mon, 21 Oct 2024 00:00:00 +0000 https://kk6mrp.com/buying-a-home https://kk6mrp.com/buying-a-home Pinephone with PostmarketOS Tips <h1>Pinephone Tips</h1> <h3>Install pmbootstrap Utility</h3> <pre><code class="language-bash">pip3 install --user pmbootstrap</code></pre> <p>Or update pmbootstrap with the following:</p> <pre><code class="language-bash">pip3 install --user --upgrade pmbootstrap</code></pre> <p>I have it installed in ~/.local/bin</p> <h3>Configuring a new PostMarketOS Image</h3> <pre><code class="language-bash">pmbootstrap init</code></pre> <p>Then follow the prompts to build the image.</p> <h3>Updating an existing PostMarketOS Image</h3> <pre><code class="language-bash">pmbootstrap pull</code></pre> <p>and then follow the prompts...</p> <h3>Build the PostmarketOS Image</h3> <pre><code class="language-bash">pmbootstrap install</code></pre> <p>then install to the eMMC with (using dmesg or lsblk to find the proper path of course) Make sure you format the target device and use <a href="https://github.com/dreemurrs-embedded/Jumpdrive">Jumpdrive</a> to expose the device over USB:</p> <pre><code class="language-bash">pmbootstrap install --sdcard=/dev/mmcblk</code></pre> <p>Then shutdown the pmbootstrap chroot:</p> <pre><code class="language-bash">pmbootstrap shutdown</code></pre> <p>You should be good to go!</p> Fri, 05 Feb 2021 00:00:00 +0000 https://kk6mrp.com/pinephone https://kk6mrp.com/pinephone