PROJECTS

Making It Easy To Use NeoPixels On The Pi

November 22, 2019

Info

Been using Adafruit NeoPixels on the PiCluster to indicate when a job is working and complete. So I set up a python script that the Pi can use to run the LED and change the colors.

Based off of Jeff Geerling Pi dramble LED code

Code

#!/usr/bin/env python3
import board
import neopixel
import argparse
pixels = neopixel.NeoPixel(board.D18, 1)

# Get RGB colors from command line arguments.
parser = argparse.ArgumentParser(description = 'Add a little color to your life.')
parser.add_argument('color', metavar='color', type=str, nargs=1,
                   help='A color value of red, green, blue, cyan, magenta, yellow, purple white, or off.')
args = parser.parse_args()    

pixels[0] = (0, 0, 0)

# Set colors.
if args.color[0] == 'red':
      pixels[0] = (63, 0, 0)
elif args.color[0] == 'green':
      pixels[0] = (0, 63, 0)
elif args.color[0] == 'blue':
  pixels[0] = (0, 0, 63)
elif args.color[0] == 'cyan':
  pixels[0] = (0, 63, 63)  
elif args.color[0] == 'magenta':
  pixels[0] = (63, 0, 63)    
elif args.color[0] == 'yellow':
  pixels[0] = (63, 63, 0)   
elif args.color[0] == 'purple':
  pixels[0] = (75, 0, 130)   
elif args.color[0] == 'orange':
  pixels[0] = (63, 42, 0)      
elif args.color[0] == 'white':
  pixels[0] = (63, 63, 63)   

Links

https://lab.borkslash.com/BorkStick/pi-led

https://www.pidramble.com/wiki/hardware/rgb-led-gpio

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

Finishing Up the PiCluster

November 22, 2019

Finally got the cases printed for the PiCluster and an easy way to add the LED’s

3D Printing 4 More Cases for the PiCluster

November 22, 2019

Printing out the rest of the cases for the cluster using a clear PETG filament

LINKS

Filament – 3D Filkemp Print Master Pro 3DF175PETG03-01 PETG 3D Printer Filament, Spool, 1.75 mm Diameter, Clear

3D Printer – Raise3D 101017001 Pro2 Plus 3D Printer, Dual Extruder, Fully Enclosed

Making A LED Bracelet

September 2, 2019

Info

3D Printing a Rack Mountable Case for the PiCluster

September 2, 2019

Info

Wanted something that looks a bit better for the PiCluster so i found a rack mountable case and 3D printed it now to print 4 more and the rack

Links

Print Files:

Filament – DURAMIC 3D Premium PLA Plus Printer Filament 1.75mm, 3D Printing Filament with Build Surface 200 x 200mm, 1kg Spool(2.2lbs), Dimensional Accuracy +/- 0.05 mm, Black

3D Printer – Raise3D 101017001 Pro2 Plus 3D Printer, Dual Extruder, Fully Enclosed

BORK.HOST Controller

May 23, 2019

Info

Needed an easy way to test my WordPress scripts so I am working on setting up a basic site with a few forms and buttons that are hooked up to some backend bash scripts.

It’s WordPress Setup Script Testing Time Yo

May 23, 2019

Info

Now that I have the testing env somewhat setup, i can use the script to test how good i can duct taped this code together.

script

  • asks for an install name
  • creates USER and DB
  • then pulls WP core files
  • config WP
  • config and enable site for apache
  • config and enable site for NGINX

Steps

  • script seems to be mostly working except for the configs
  • wrote a delete install script that cleans up an INSTALL
  • using EOF to copy over the configs
  • the INSTALL argument seems to be causing the issues
  • anything with $ in the configs are being replaced
  • escape those $ yo \$INSTALL
  • script works now

Needs A Better Way To Test This_ I should hook this up to a button

Ref

BORK.HOST Test Server

May 23, 2019

Info

needed something to test my new wordpress setup script on, so i am setting up a new VM template I can use for BORK.HOST web nodes.

  • setup a fresh ubuntu install
  • update security
  • join LDAP
  • install LAMP
  • install phpmyadmin
  • setup NGINX as a reverse proxy
  • clone server-stuff repo
  • setup WordPress Install
  • test WordPress
  • remove wordpress and snapshot Time For Testing

Ref

WordPress BASH Script

May 23, 2019

Info

  • using install script from BookStack as a base for a WordPress setup script
  • got the script somewhat written. i need to setup a server for testing

Ref

Grub for HiDPI

May 23, 2019

Generate Font for GRUB

sudo grub-mkfont --output=/boot/grub/fonts/DejaVuSansMono24.pf2 \
--size=24 /usr/share/fonts/truetype/dejavu/DejaVuSansMono.ttf
sudo vim /etc/default/grub

add to top

GRUB_FONT=/boot/grub/fonts/DejaVuSansMono24.pf2

Update Grub

sudo update-grub