Wednesday, November 11, 2020

git - make the history never exist

I committed something to my git repo that I didn't mean to. Always, I mean always create a .gitignore first and add everything that should be excluded. Modifying the history is super scary and dare I say, dangerous. I did a quick google search and ran across this which seems to have the best steps for doing the desired surgery.

https://stackoverflow.com/questions/10067848/remove-folder-and-its-contents-from-git-githubs-history/32886427#32886427

First run this to check the size:

git count-objects -vH

Just in case that link stops working I've pasted there relevant bits here:

# Make a fresh clone of YOUR_REPO
git clone YOUR_REPO
cd YOUR_REPO

# Create tracking branches of all branches
for remote in `git branch -r | grep -v /HEAD`; do git checkout --track $remote ; done

# Remove DIRECTORY_NAME from all commits, then remove the refs to the old commits
# (repeat these two commands for as many directories that you want to remove)
git filter-branch --index-filter 'git rm -rf --cached --ignore-unmatch DIRECTORY_NAME/' --prune-empty --tag-name-filter cat -- --all
git for-each-ref --format="%(refname)" refs/original/ | xargs -n 1 git update-ref -d

# Ensure all old refs are fully removed
rm -Rf .git/logs .git/refs/original

# Perform a garbage collection to remove commits with no refs
git gc --prune=all --aggressive

# Force push all branches to overwrite their history
# (use with caution!)
git push origin --all --force
git push origin --tags --force

Lastly run this command to check the size again:

git count-objects -vH

It appears to have worked. I did have to reclone my repository which seemed a little odd but it worked.

Tuesday, November 10, 2020

Delete .DS_Store files on Mac

As with many things I post to my blog I post them here rather than keeping on some personal repository of information because I don't want to have to remember it every time (no matter how simple it might be) and other people might find it useful when searching around.

Have you ever needed to remove all the .DS_store files on your Mac from all subdirectories, I dunno, maybe from a git repository? If so here:


find . -name ".DS_Store" -print -exec rm {} \;

Thursday, November 5, 2020

Parts List for Raspberry Pi Mini Super Computer

 Here are the parts for the Raspberry Pi Mini Super Computer. A build video can be found here.

Name

Description

URL

Count

Price

Total

Ubiquiti Networks US-48 48-Port UniFi Managed Gigabit Switch with SFP BH #UBUS48 • MFR #US-48 4 reviews 2 Questions, 3 Answers 


https://www.bhphotovideo.com/c/product/1267264-REG/ubiquiti_networks_us_48_48_port_unifi.html

2

359

718

Network Cloud Key

Ubiquiti Networks UniFi Cloud Key Gen2 B&H # UBUCKG2 MFR # UCK-G2

https://www.bhphotovideo.com/bnh/controller/home?O=productlist.jsp&A=details&Q=&sku=1426308&is=REG&fromDisList=y

1

179

179

Ubiquiti Networks Networks Unifi Security Gateway Pro (USG-PRO-4)


https://www.bhphotovideo.com/c/product/1224003-REG/ubiquiti_networks_usg_pro_4_enterprise_gateway_router.html

1

311.00

311

Lenovo


https://www.bhphotovideo.com/c/product/1447926-REG/lenovo_10vg000sus_m715q_tiny_amd_ryzen.html

2

$649.00

$1298.00

Raspberry Pi 3B+


https://www.adafruit.com/product/3775

84

$35.00

$2940.00

Pearstone Cat 6a Snagless Patch Cable (1', Blue)


https://www.bhphotovideo.com/c/product/1368134-REG/pearstone_cat6_a01bl_cat6_snagless_patch_cable.html

84

$1.99

$167.16

Pearstone Cat 6a Snagless Patch Cable (3’, Blue)


https://www.bhphotovideo.com/c/product/1368083-REG/pearstone_cat6_a03bl_cat6_snagless_patch_cable.html

6

$1.99

$11.94

StarTech.com 3 ft / 91cm Micro USB Cable - A to Right Angle Micro B - USB Type A - 90 Degree Micro-USB Type B (M) - Black (UUSBHAUB3RA)


https://www.amazon.com/gp/product/B001AR4NC8/ref=ppx_yo_dt_b_asin_title_o02_s00?ie=UTF8&psc=1

84

$3.00

$252.00

Security-01 2 Packs 80mm by 80mm by 25mm 8025 12V DC 0.20A Ball Bearing Brushless Cooling Fan 2pin AV-F8025MB UL CE


https://www.amazon.com/gp/product/B072QCTYJW/ref=ppx_yo_dt_b_search_asin_title?ie=UTF8&psc=1

42

$15.98

$671.16

USB Charging Station, 60 Ports USB Power Station


https://www.amazon.com/gp/product/B07MB12XZ4/ref=ppx_yo_dt_b_asin_title_o06_s00?ie=UTF8&psc=1

2


0

NP-05B Remote PDU, UL-STD TUV Listed, 5 Switchable Outlets. Manufactured and Supported in USA. Control Via Web, Telnet, USB Serial Port.


https://www.amazon.com/gp/product/B0039OZKPE/ref=ppx_yo_dt_b_search_asin_title?ie=UTF8&psc=1

1

$229.00

$229.00

10 Pack AC 250V 10A IEC 320 C14 Panel Mount Plug Adapter Power Connector Socket Black Screw Mount 3 Pins Inlet Power Plug Socket By MXR


https://www.amazon.com/gp/product/B07DCXKNXQ/ref=ppx_yo_dt_b_search_asin_title?ie=UTF8&psc=1

1

$6.99

$6.99

20 Amp Commercial Grade Self Grounding Duplex Outlet, White


https://www.homedepot.com/p/Leviton-20-Amp-Commercial-Grade-Self-Grounding-Duplex-Outlet-White-CR020-W/301361601?mtc=Shopping-VF-F_D27E-G-D27E-27_2_WIRING_DEVICES-MULTI-NA-Feed-PLA-NA-NA-WIRING_DEVICES&cm_mmc=Shopping-VF-F_D27E-G-D27E-27_2_WIRING_DEVICES-MULTI-NA-Feed-PLA-NA-NA-WIRING_DEVICES-71700000033102358-58700003867202208-92700048704098216&gclid=Cj0KCQjwlN32BRCCARIsADZ-J4sX8I34COOeOObT54AuBh8-WH9bJEW56rMUTTd-6F6A_CWZAGu1hdMaAg4fEALw_wcB&gclsrc=aw.ds

1

$1.58

$1.58

ADJ Products AC POWER STRIP (PC-100A)


https://www.amazon.com/gp/product/B00KFZ98YO/ref=ppx_yo_dt_b_search_asin_title?ie=UTF8&psc=1

1

$60.00

$60.00

Lenovo m715q


https://www.bhphotovideo.com/c/product/1447926-REG/lenovo_10vg000sus_m715q_tiny_amd_ryzen.html/?ap=y&ap=y&smp=y&smp=y&lsft=BI%3A514&gclid=Cj0KCQjwlN32BRCCARIsADZ-J4tcQ5N2xqLSAEzwLDfX2ZHTNgKxCieVyw98BsSOkuGtUyIclAF70E8aAvMeEALw_wcB

2

$500.00

$1000.00

UGREEN USB C Charger 18W PD 3.0 Type C Wall Charger Power Delivery for iPhone SE 11 Pro Max Xs Max XR X 8 Plus, AirPods Pro, iPad Pro, Google Pixel 3a XL, Samsung Galaxy S10+ S9+, LG V50 ThinQ G8

Needed to power cloud key

https://www.amazon.com/gp/product/B07R7K2QMW/ref=ppx_yo_dt_b_search_asin_title?ie=UTF8&psc=1

1

$13.89

$13.89

XLX 50PCS 25Pair Mini Micro 2.54 2PIN Female and Male Connection Plug with Red Black Terminal Connector Wire Cable 200mm Compatible with JST XH

Connect to fans. You have to swap red and black or remember to connect red to black

https://www.amazon.com/gp/product/B076JFFDWN/ref=ppx_yo_dt_b_search_asin_title?ie=UTF8&psc=1

1

$17.99

$17.99

Power supply for fans?






DisplayPort to HDMI, Benfei Gold-Plated DP Display Port to HDMI Adapter (Male to Female) Compatible for Lenovo Dell HP and Other Brand

Connect Lenovo to HDMI

https://www.amazon.com/gp/product/B017Q8ZVWK/ref=ppx_yo_dt_b_search_asin_title?ie=UTF8&psc=1

2

$9.99

$19.98

BATIGE HDMI Male to Female Car Mount Flush Extension Cable Truck Boat Motorcycle Dashboard Flush Mount with Mounting Panel - 3ft


https://www.amazon.com/gp/product/B01LX1FQPE/ref=ppx_yo_dt_b_search_asin_title?ie=UTF8&psc=1

2

$9.45

$18.90

VELCRO Brand ONE-WRAP Roll Black | 30 Ft x 1-1/2 In | Reusable Self-Gripping Hook and Loop Tape | Cut Straps to Bundle Tie Materials and Tools in Garage Shed or Worksite


https://www.amazon.com/gp/product/B00404ULFQ/ref=ppx_yo_dt_b_search_asin_title?ie=UTF8&psc=1

1

$20.00

$20.00

GOWOS (5 Pack) Cat6 Shielded RJ45 Panel Mount Industrial Bulkhead - Female to Female Feed Thru Coupler


https://www.amazon.com/gp/product/B07PRDVZ5X/ref=ppx_yo_dt_b_search_asin_title?ie=UTF8&th=1

1

$57.03

$57.03

Neutrik NE8FDP etherCON RJ-45 Feedthrough Chassis Connector


https://www.amazon.com/gp/product/B002BER402/ref=ppx_yo_dt_b_search_asin_title?ie=UTF8&psc=1

2

$8.71

$17.42

Gigabit + PoE Adapter (L6-NETPOE)


https://redpark.myshopify.com/products/gigabit-ethernet-poe-adapter-l6-netpoe?_pos=1&_sid=d0dccef3e&_ss=r

1

99

99

USB Micro B Cable for Lightning 400mm (L90-B-4)


https://redpark.myshopify.com/products/usb-micro-b-cable-for-lightning-l90-b-40?_pos=4&_sid=a7fe65e2c&_ss=r

1

29.00

29

SR Mini Keyboard Wired Thin Light 78 Keys USB Multimedia Small for Pc Computer Laptop


https://www.amazon.com/gp/product/B01IQL2VCE/ref=ppx_yo_dt_b_search_asin_title?ie=UTF8&psc=1

1

12.99

12.99

Neutrik NE8FDP etherCON RJ-45 Feedthrough Chassis Connector


https://www.amazon.com/gp/product/B002BER402/ref=ppx_yo_dt_b_search_asin_title?ie=UTF8&psc=1

2

8.71

17.42

Seismic Audio - SA-ET10-10 Foot CAT6 Ethercon Compatible RJ45 Pro Audio Patch Cable - Pro Series OFC for Recording, Stage, Studio use


https://www.amazon.com/dp/B07MCYS74X/ref=sspa_dk_detail_4?psc=1&pd_rd_i=B07MCYS74X&pd_rd_w=xd6L9&pf_rd_p=48d372c1-f7e1-4b8b-9d02-4bd86f5158c5&pd_rd_wg=eTMA3&pf_rd_r=K8R6X4J5Y7Z0728XY4EY&pd_rd_r=1bdfcc85-8cc3-48cd-856a-c4fc7c79ac54&spLa=ZW5jcnlwdGVkUXVhbGlmaWVyPUExS1dVQVMzS1VGVEVOJmVuY3J5cHRlZElkPUEwMTgyMDkzMzczMkhVTDVGT0VGRCZlbmNyeXB0ZWRBZElkPUExMDE0NTkyMVNXOVpRQUdOV0o2NiZ3aWRnZXROYW1lPXNwX2RldGFpbCZhY3Rpb249Y2xpY2tSZWRpcmVjdCZkb05vdExvZ0NsaWNrPXRydWU=

1

19.99

19.99

Pelican Air 1615 Case with Foam (Yellow)

With Foam

https://www.amazon.com/gp/product/B07JHTXF3X/ref=ppx_yo_dt_b_asin_title_o08_s01?ie=UTF8&psc=1

1

325.77

325.77

Ceptics 12Pcs International Travel Worldwide Grounded Universal Plug Adapter Set - Charge Your Devices from Anywhere in The World


https://www.amazon.com/gp/product/B01DJEBLQU/ref=ppx_yo_dt_b_asin_title_o05_s00?ie=UTF8&psc=1

1

13.85

13.85