Live data from Hacker News

Ask HN: What's are your personal automations?

news.ycombinator.com

31–40 of 159 posts

Re: Ask HN: What's are your personal automations?

#31
I've found that paying people to provide you with good food saves tonnes of time: shopping, prepping, cooking, cleaning, garbage. Hotel buffet breakfasts or similar are a good solution. This is by far the most time efficient daily hack. Also good are floor cleaning robots. Not owning a car is great too, if you add up all the time doing parking/registration/license/insurance/whatever. Software... well, mostly just avoid closed source stuff where oodles of invested time winds up wasted when they arbitrarily mothball the product, close the cloud or deeply alter the interface without consultation. Keep documentation with code. Keep all code in a revision control system. Oh, and write less code. The less code you have to maintain, the better.

Re: Ask HN: What's are your personal automations?

#32
I got sick of opening the same tmux/terminal format every time I had to restart, so I wrote this:

    #!/bin/bash
    
    function command() {
            CMD="$1"
            xdotool type "$1"
            xdotool key Return
    }
    
    function key() {
            KEY="$1"
            xdotool key $KEY
    }
    
    function clear() {
            for n in {1..10}; do
                    key BackSpace
            done
    }
    
    function name_panel() {
            NAME="$1"
            key ctrl+a
            key comma
            clear
            command $NAME
    }
    
    name_panel 'cmd'
    
    key ctrl+a
    key c
    name_panel 'srv'
    
    key ctrl+a
    key c
    name_panel 'make'
    
    key ctrl+a
    key n
    
    echo "Now type ssh-add to log in..."
    ssh-agent bash

Re: Ask HN: What's are your personal automations?

#33

    [ $1 ] || { echo "Notify what?"; exit; }

    curl -X "POST" "https://push.techulus.com/api/v1/notify/$PUSHKEY" \
         -H 'Content-Type: application/json; charset=utf-8' \
         -d $'{ "title": "Linux",   "body": "'$1'" }'
     
    echo;

I use this app[1] that notifies my cellphone, so I wrote this bash script that I call when a long task is done, so it notify me when I'm away.

1 - https://push.techulus.com/

Re: Ask HN: What's are your personal automations?

#34
Ring has been a fun! One of my holiday todo's is to finally sit down and program the IFTTT integration for my Amazon plugs to turn my garden lights on when my Ring Doorbell detects motion.

If you have someone you'd like to get interested in IoT and/or programming, it's probably the best feedback loop between effort and reward you can find -- up there with learning to program HTML/CSS/JavaScript and refreshing a web app on local

Re: Ask HN: What's are your personal automations?

#38

One of my favorite automations is a slack bot I made to send me a message when a process finishes: https://github.com/spohngellert-o/SlackProcessTrackerBot As a data scientist I often run code that takes hours, and getting a slack message when it finishes is super helpful, and it has often helped me catch when a script finishes too early due to some error.

I do the same thing, but I use the Twilio CLI to send me a text so that I can get up and walk around if the process is blocking other work. (:

[deleted]

Re: Ask HN: What's are your personal automations?

#39
A cron job that runs on a server and sends me a daily digest email. It’s composed of a number of modules that each check one thing and report a message and a “severity”. The glue code then orders them and send the email. Currently it checks:

Twitter follows/unfollows for me, my wife, and my Twitter bot

Stock movements for the few stocks (RSUs) I have

Confirmation that several daily backups (db dumps etc) were successful

Upcoming SSL cert and domain expirations

New GitHub stars

Disk space left on my personal server (running out tends to make it crash)

I know that looks like a lot of stuff, but the goal is for the script to programmatically determine which ones cross the threshold into being actionable/important and to hide/de-prioritize the unimportant ones for me so I can confidently ignore them and focus on any important ones.

Re: Ask HN: What's are your personal automations?

#40

I automated my desktop environment configuration using Docker containers. I'm able to go from a headless tty to perfectly tailored desktop environment in ~2.5 seconds. First time start requires a ~40 min build, byut thereafter ~2.5s to start afresh. https://github.com/sabrehagen/desktop-environment I did the same think for my production application environment. One command to go from no infrastructure to production g…

Does this mean your entire desktop environment is a Docker container? Or are you using the docker container to setup on the host?
Post reply on HN