@czardestructo@lemmy.world avatar

czardestructo

@czardestructo@lemmy.world

Reddit refuge, escentric engineer and serial hobbyist.

This profile is from a federated server and may be incomplete. Browse more on the original instance.

Billion $ net worth company creating kickstarter...

Philips has a net worth in the billions, $20.67 billion as of July 12, 2023. (Source link) Yet they decided to create a kickstarter, charging “early bird” buyers these earphones that’s designed for wearing while sleeping, basically the same as any other earphones, just slimmed down and cables running around your head....

Bluefish - HTML Editor So Easy That Your Grandma Could Use It (bluefish.openoffice.nl)

This software is easy to use thanks to its tags feature where all you have to do is click one button, enter the text you want displayed, and voila! Not only that, it also has wizards that make creating tables and other visual elements a breeze. It does have one drawback - no WYSIWYG, so no live previews of your html files.

czardestructo,
@czardestructo@lemmy.world avatar

For what it’s worth I recently moved from Wordpress to Grav and I’m not looking back. It’s a web server and the editor is built in but it’s all markdown and fast as hell. The file system is flat and easy to understand. I’m smitten.

czardestructo,
@czardestructo@lemmy.world avatar

Anything is possible but it costs more money and makes the product bigger. I don’t see how consumers are going to stomach a wireless ear bud that has removable batteries when the ear buds get large, uncomfortable and expensive. I guess we will see what the market bears.

czardestructo, (edited )
@czardestructo@lemmy.world avatar

I agree and that’s the point I was making, wireless ear buds are completely disposable and likely can’t be anything but. Not sure why I got downvoted to hell.

czardestructo,
@czardestructo@lemmy.world avatar

There are lots of ideas like this when you don’t consider the battery certification process and the tons of safety standards. A stand alone battery like this requires it’s own housing (needs to be thick so you can’t crush the soft battery), certified connector for measuring it’s temperature and getting power out, include it’s PCM circuitry and be perfectly safe for whenever a customer might accidentally do to it. It’s far from from trivial. I do this for a living.

czardestructo,
@czardestructo@lemmy.world avatar

Tplink Kasa WiFi AC plugs have the ability to turn the led off. I suspect the switches do too?

czardestructo,
@czardestructo@lemmy.world avatar

This is 10 minutes from where my father grew up. Just got back. Did you take this picture? Did you visit?

czardestructo,
@czardestructo@lemmy.world avatar

Hope you had fun, beautiful island that is getting remarkably popular lately. Brits love it. I’ve been going there since I was a child and have seen a lot of changes.

czardestructo,
@czardestructo@lemmy.world avatar

I have a folder that all my docker services are in. Inside the folder is a folder for each discrete service and within that folder is a unique compose file necessary to run the service. Also in the folder is all the storage folders for that service so it’s completely portable, move the folder to any server and run it and you’re golden. I shut down all the services with a script then I can just tar the whole docker folder and every service and its data is backed up and portable.

czardestructo,
@czardestructo@lemmy.world avatar

In case anyone cares here is my script, I use this for backups or shutting down the server.

<pre style="background-color:#ffffff;">
<span style="color:#323232;">#!/bin/bash
</span><span style="color:#323232;">
</span><span style="color:#323232;">logger "Stopping Docker compose services"
</span><span style="color:#323232;">
</span><span style="color:#323232;">services=(/home/user/docker/*)    # This creates an array of the full paths to all subdirs
</span><span style="color:#323232;">#the last entry in this array is always blank line, hence the minus 1 in the for loop count below
</span><span style="color:#323232;">
</span><span style="color:#323232;">for ((i=0; i<=(${#services[@]}-1); i++))
</span><span style="color:#323232;">do
</span><span style="color:#323232;">    docker compose -f ${services[i]}/docker-compose.yml down &
</span><span style="color:#323232;">done
</span><span style="color:#323232;">
</span><span style="color:#323232;">#wait for all the background commands to finish
</span><span style="color:#323232;">wait 
</span>
czardestructo,
@czardestructo@lemmy.world avatar

I do ~/docker so I also have a docker-prototype folder for my sandbox/messing around with non-production stuff and I have a third folder for retired docker services so I keep the recipe and data in case I go back.

czardestructo,
@czardestructo@lemmy.world avatar
czardestructo,
@czardestructo@lemmy.world avatar

55W idle for 3 servers, network gear and UPS. I live in the US but electricity is still expensive and I try to keep everything efficient. My primary/most powerful server with 20TB of SSD only uses 22W idle.

Ghost Pi - an unconventional backup solution (lemmy.world)

I call this nonsense host ‘Ghost’, for me it’s similar to a tape backup solution. Fairly simple concept, it’s an old Pi1 + external mechanical drive that sits dormant with its ethernet off. Once a month, at a random time and random date it enables the ethernet, spins up the drive and pulls data from the main server to...

czardestructo,
@czardestructo@lemmy.world avatar

Does anyone see the attatched mp4 video? If not here is an imgur link.

czardestructo,
@czardestructo@lemmy.world avatar

Sorry, I forgot to post the scripts. I'm a meathead electrical engineer so I don't use GIT or anything so here is the code dump. To summarize the setup's software:

  • cron to run the script that turns the ethernet on and runs rsync to pull data from the server. I have 12 cron entries for the various months/dates/times to run.
  • python script to monitor the button presses for manually running a backup or turning the ethernet port back on
  • bash script that runs the rsync job to pull data from the primary server

The backup script is fairly boring, just runs rsync and pushes the rsync log files back to the primary server. If it fails it sends me an email before turning the ethernet back off and going black.

#So here is my python code that runs the button press:

#!/usr/bin/env python

import RPi.GPIO as GPIO
import subprocess
import time
from multiprocessing import Process


#when this script first runs, at boot, disable ethernet
time.sleep(5) #wait 5 seconds for system to boot, then try and disable ethernet.
subprocess.call(['/home/pi/ethernet_updown.sh'], shell=False)

GPIO.setmode(GPIO.BCM)
GPIO.setup(3, GPIO.IN, pull_up_down=GPIO.PUD_UP)
GPIO.setup(22, GPIO.OUT) #controls TFT display backlight
GPIO.setup(23, GPIO.IN) #pull up or down is optional, the TFT display buttons have a hardware 10k pull up. Measure low tranisitions 
GPIO.setup(24, GPIO.IN)


#watches the button mounted above the USB port, in the Pi's case. 
def case_button_watch():
    while True:
        GPIO.wait_for_edge(3, GPIO.FALLING)
        #wait 100ms then check if its still low, debounce timer
        time.sleep(.100)
        if GPIO.input(3) == GPIO.LOW:
            #do something as it's a button press
            print('Button is pressed!')
            time.sleep(.900)
            if GPIO.input(3) == GPIO.LOW:
                #if the button is pressed for over 1 second its a long press. Run the backup script
                print('Button long press (greater than 1 second), running an unscheduled backup')
                subprocess.call(['/home/pi/backup.sh'], shell=False)
            else:
                #the press was greater than 100mS but less than 1000mS, just toggle the ethernet
                print('Button short press (less than 1 second), toggling the ethernet')
                subprocess.call(['/home/pi/ethernet_updown.sh'], shell=False)
        else:
            #do nothing as its interference
            print('GPIO3 debounce failed, it was noise')

#watches the buttons in the TFT display 
def TFT_display_button1():
    while True:
        GPIO.wait_for_edge(23, GPIO.FALLING)
        #wait 100ms then check if its still low, debounce timer
        time.sleep(.100)
        if GPIO.input(23) == GPIO.LOW:
            #do something as it's a button press
            print('Button GPIO23 is pressed!')
            GPIO.output(22, GPIO.HIGH) #turn the backlight ON
        else:
            #do nothing as its interference
            print('GPIO23 debounce failed, it was noise')

#watches the buttons in the TFT display
def TFT_display_button2():
    while True:
        GPIO.wait_for_edge(24, GPIO.FALLING)
        #wait 100ms then check if its still low, debounce timer
        time.sleep(.100)
        if GPIO.input(24) == GPIO.LOW:
            #do something as it's a button press
            print('Button GPIO24 is pressed!')
            GPIO.output(22, GPIO.LOW) #turn the backlight OFF
        else:
            #do nothing as its interference
            print('GPIO24 debounce failed, it was noise')

if __name__ == '__main__':

    #run three parallel processes to watch all three buttons with software debounce
    proc1 = Process(target=case_button_watch)
    proc1.start()

    proc2 = Process(target=TFT_display_button1)
    proc2.start()

    proc3 = Process(target=TFT_display_button2)
    proc3.start()

#bash script that toggles the ethernet - if its on, it turns it off. if its off, it turns it on:

#!/bin/bash

if sudo ifconfig | grep 'eth0' | grep 'RUNNING' > /dev/null; 
then 
    wall -n "$(date +"%Y%m%d_%H%M%S"):Ethernet going down"
    sudo ifconfig eth0 down	
else 
    wall -n "$(date +"%Y%m%d_%H%M%S"):Ethernet going up"
    sudo ifconfig eth0 up
fi

czardestructo,
@czardestructo@lemmy.world avatar

I use Joplin notes to track my code revisions. It’s incredibly crude but it works and keeps my documention private and is also my wiki for each server so I know what the heck I setup and did.

czardestructo,
@czardestructo@lemmy.world avatar

It’s probably just one pump/motor per physical stand and if both sides of the stand are used at the same time you get half the flow rate since you’re sharing it with your neighbor.

czardestructo,
@czardestructo@lemmy.world avatar

All I can picture for lemmy users right now is an excited dog at a dog park that is just loving life and wants to say high to every other dog and is wagging his tail so hard that his whole ass is wagging.

czardestructo,
@czardestructo@lemmy.world avatar

Is there a such thing as a cache only server? If so I'd love to sign up as being a cache bitch and help out!

  • All
  • Subscribed
  • Moderated
  • Favorites
  • megavids
  • tacticalgear
  • DreamBathrooms
  • osvaldo12
  • mdbf
  • everett
  • magazineikmin
  • khanakhh
  • Youngstown
  • rosin
  • slotface
  • modclub
  • kavyap
  • tester
  • JUstTest
  • ngwrru68w68
  • thenastyranch
  • cisconetworking
  • Durango
  • ethstaker
  • InstantRegret
  • Leos
  • anitta
  • GTA5RPClips
  • normalnudes
  • cubers
  • provamag3
  • lostlight
  • All magazines