Message from @Big T

Discord ID: 605696926263803914


2019-07-30 09:07:09 UTC  

idk i think i just disliked Java as i got into C#

2019-07-30 09:07:41 UTC  

um, team jacob signing off

2019-07-30 09:08:12 UTC  

you just made a kid somewhere gay

2019-07-30 09:37:20 UTC  

lol

2019-07-30 09:38:15 UTC  

ah you dont like java, that makes sense then.

2019-07-30 09:38:19 UTC  

i like java

2019-07-30 09:38:52 UTC  

<- Oracle Certified Associate Programmer

2019-07-30 09:39:39 UTC  

idk if i dont like it, that was more than a few years ago, but i havent worked with a strictly defined language in at least a year

2019-07-30 09:39:43 UTC  

or whatever the term is

2019-07-30 09:39:59 UTC  

oh wait no i used VB

2019-07-30 09:40:03 UTC  

<:grrr:531619820697944092> <:grrr:531619820697944092> <:grrr:531619820697944092> <:grrr:531619820697944092> <:grrr:531619820697944092> <:grrr:531619820697944092> <:grrr:531619820697944092> <:grrr:531619820697944092> <:grrr:531619820697944092>

2019-07-30 09:40:08 UTC  

...

2019-07-30 09:40:19 UTC  

VB is globohomo

2019-07-30 09:40:31 UTC  

statically typed languages are great

2019-07-30 09:40:34 UTC  
2019-07-30 09:41:00 UTC  

lol for that, you have no excuse to try out java @Vesdii

2019-07-30 09:41:44 UTC  

it took me all night to get the bones and tendons of this idea out onto a shell script

2019-07-30 09:42:04 UTC  

whats the idea? and why would you use a shell script for it lol?

2019-07-30 09:42:29 UTC  

easier to write than a python script cuz i dont wanna encase everything in a fuckin function

2019-07-30 09:43:12 UTC  

so my linux machine is my laptop and i want to be able to have it on at all times so tasks and bots can run all the time

2019-07-30 09:43:20 UTC  

you technically dont have to with python

2019-07-30 09:44:08 UTC  

automation eh? 💤

2019-07-30 09:44:23 UTC  

so i bought a pack of smart plugs....

2019-07-30 09:44:49 UTC  

and even if you had to wrap it with a function, its only 2 more lines

2019-07-30 09:45:00 UTC  

function definition and a line calling it

2019-07-30 09:45:21 UTC  

but again, you can just write python with out any function declarations.

2019-07-30 09:45:54 UTC  

im gonna use this to toggle the smart plug

2019-07-30 09:46:20 UTC  

(work in progress, got some shit to move around)
```
upower -i $(upower -e | grep BAT) | egrep 'state|percentage' > .power-temp
cut -c 26- .power-temp | sponge .power-temp
STATE=`head -1 .power-temp`
PERC=`tail -1 .power-temp | cut -c -2`
case $STATE in
charging)
echo charging
;;
discharging)
echo discharging
;;
fully-charged)
echo fully-charged
;;
esac
if [ $PERC -le '20' ]; then
echo '<=20%'
fi
rm .power-temp
```

2019-07-30 09:46:39 UTC  

ew

2019-07-30 09:46:41 UTC  

ikr

2019-07-30 09:46:44 UTC  

it's aids

2019-07-30 09:46:51 UTC  

why write that then?

2019-07-30 09:47:14 UTC  

cuz i didnt know how to do it efficiently with python

2019-07-30 09:47:26 UTC  

people keep telling me that but idk how

2019-07-30 09:47:55 UTC  

does the smart plug have an api?

2019-07-30 09:48:01 UTC  

think so

2019-07-30 09:48:13 UTC  

it works with IFTTT and Alexa n shit so i assume so

2019-07-30 09:48:21 UTC  

start there

2019-07-30 09:48:42 UTC  

well i dont have the plug yet so ill redesign it when i get it

2019-07-30 09:49:07 UTC  

have my laptop charger only be receiving power when the laptop needs to be charged

2019-07-30 09:49:34 UTC  

cronjob will check every 5 minutes for if it's 20% or under