[Music]
okay
oh
what's up guys um
my name is peter thanks for coming to my
talk um this is a script kitty's guide
to easy wins um
this is the first time i've
presented to um
any large group this is also the first
time i've uh i've talked in front of a
bunch of hackers so i present this with
a great amount of humility and um
and
please feel free to ask questions if i
yard sale and it gets awkward um but
thank you guys for coming and
let's just get to it
so as a heads up this talk is not for
the advanced this is like
i'm i'm a software developer by trade uh
i just basically work with pandas i'm
i'm very very much a pigeonholed talent
but
this is what i've been really excited
about for like the past 10 months and
i've been putting it into into my
workflows in professional and personal
life
and it's really made an awesome
like change in a lot of things so
there it is there it is if you're
looking for buffer overloads or reverse
engineering this isn't the talk
but basically i'm talking about macros
the things that have
that are like one shot bits of code
little little things that do exactly
only one thing that are recursive or not
recursive not infinite looping no
decision making this is just like a one
and done
solution for
just any tiny task that you don't want
to do
and so takeaways i'm looking for is just
a little understanding of what i'm like
my philosophy on what has made a
difference in my workflows um some
examples of unconventional
unconventional script usage for fun and
profit
you know the risks and rewards and just
basically an opportunity to run stuff by
me if you like
so a little bit about me i'm a computer
science major i've worked mostly as
business analysts and uh nowadays i do a
lot of stuff with python
airflow pandas
and um
you know if you're a myers-briggs person
i'm an intp so that gives you an idea of
what i'm what i'm about
and and the crux of this talk is
basically
if uh
you know if you're if you're doing
something
and you're just putting all of your
focus into it you're gonna hit a you're
gonna hit a glass ceiling on how fast
you can do things
if you're spending some time on your
infrastructure
you're also going to
you're you're going to be spending a lot
of time at first
building out
like
spending a lot of time
oh man guys i'm crashing oh okay okay
but basically
if you're building out a lot of tiny
little scripts to improve your workflows
you're uh you're gonna be giving
yourself more space to think on the
bigger picture
that's generally uh
what i'm chasing after
and and so you know if you're building
out a fast infrastructure you gain speed
over time and you don't necessarily have
a top speed
also i wrote these slides and i
i feel like they're super abstract so if
you want me to dive into something a
little bit more i'm probably going to
jump around them a little bit
but
uh feel free to like chime in if you
like
so when i'm talking about a macro or a
script i'm not necessarily using formal
terminology
i am
looking for something that basically
just solves a problem pragmatically
something that i can write quickly based
on my knowledge base um
so this like examples are
like just pasting stuff mouse wiggling
um executing
like obscure bash commands that i don't
necessarily use all the time
and
when i'm looking at these the things
that i'm trying to
consider is
like is it going to be dependable
is it something that is easy to
implement
does it doesn't really provide me value
and
and largely what i'm considering is
you know is it something that i will use
the issue that i run into is you know
you can build something complex you can
build something nice
and if you don't know how to how to call
it well you can't call it reflexively
it's not necessarily helping
keep your focus where you want it
having something that you can call be a
muscle memory
is a thousand times better that's that's
kind of the
ultimately that's what it's about
yeah
i think i talked about muscle memory
it's basically i'm all about flow state
and i want to make sure that i'm
building things
that are
oh man
is this is this talk to like
with it can you explain what a flow
state looks like for you yeah yeah okay
awesome thank you um so like flow state
for me is like
being able to be
engaged enough that i don't get bored or
disconnected from my work but at the
same time it's something that
um
it's something that removes the mental
fog from as you can see i'm somebody
that like spaces out hard i like
bifurcate mentally and so if i have
something that allows me to just be like
okay i know that i've got to get this
thing done i just hit the button and it
like sends out the nice email for a
recurring problem that i don't
necessarily have the emotional capacity
to want to address
like flow state for me is being able to
say okay someone asked a pointed
difficult question
i can hit this button it autoresponds
and it responds diplomatically so i
still have the tactical advantage of
being kind but i also
address the issues premeditatedly
yeah that's a little bit about the
environment you're working in to give
some context like yeah i should be
working at linux yeah okay awesome
question so
where i work is um
i work in in two different
physical machines right one is my just
regular linux machine that i just tool
around on personally and then i have it
connected to a kvm to a
windows box that has
wsl2 and then some containers for you
know different linux environments for
airflow
so
so i want to talk a little bit about you
know what let's just jump into the
hardware then so i can tell you like how
i how i call these macros right
so because my my work computer is
is a windows machine i use auto hotkey a
lot
and yeah you know of course if you want
to put these things into play you
probably want like admin access to your
computer but um
but autohotkey are you who's familiar
with this have you guys
alright
good good so i think it was originally
made for um for cheating in multiplayer
games online and it just leverages the
net framework and you can basically
say i want to set up control f9 to like
button mash you know
turn 180 degrees and like headshot
somebody with a shotgun or something
like that um but it's really useful in a
work environment so
like in this in this picture here can
you guys see my mouse i don't know
um okay cool
so like f10 right now like i just have
that set up so that i just i think it
opens an rdp instance this is for my my
uh a former setup
but
it's really nice being able to say you
know i
you know coming back to the flow state
question
how do i jump between apps like how do i
make sure that i'm moving at the speed
of thought and i don't want to just like
hit alt tab like did i use that last or
did i have to like step through like
seven documents back i can hit ctrl f2
and then pops open outlook or f6 that
builds an appointment and outlook f9
opens notepad plus plus um so being able
to switch apps when my mind is
in the attention space that it needs to
be before i find myself staring at
chrome and being like why am i looking
at this like stack overflow page from
two days ago
um
that's kind of what i'm uh what i'm
shooting for with auto hotkey um along
with that
i i have this thing called the ducky pad
has anyone heard of this thing
okay okay okay this thing's on tindy it
sells
you can you can build it yourself it's
all open source
but it's it's basically a macro pad
but what it does is you can see it's got
like two itty bitty buttons underneath
the oled and you can page through
15 pages of ducky script macros that are
like rubber ducky written
so
um you can have something that will
like what's a good example like you know
you've got you've got one that's like
for your media when you're in meetings
and you can say like okay this button's
just gonna hang up teams call this one's
gonna mute this one's gonna turn off
video or you can have it where it types
out something like
yo what's going on uh can you push this
to prod for me and because it is
leveraging just the i o you don't have
to like configure anything like that
it's literally just like
ducky scripts um
to to control either computer the reason
i mention that with the with regards to
the environment that you were talking
about is because
if you've got two computers that you're
bouncing between
if you build a script
robustly you can have it so that if you
hit a kbm switch you just you know
switch it from one computer that's
windows and one computer that's linux
and uh
if you've built something that is
that works ambivalently then then you're
set up for success for a broad use
script
let's see yeah i use bash aliases um
because my my personal
environment is linux and my work
environment has wsl2 in it i've got
linux in there as well
and and a note on a note on autohotkey
while i'm thinking about the environment
as a whole what's really cool about
having containerized linux is that if
you use autohotkey and then you have
like a
command like i've got one that's like
you type uvub and it will navigate
automatically to the path where um
where your windows environment is so
slash mount c whatever
and really handy if you're dropping in
like archived files from sharepoint
saving them on your downloads file but
then you need to reference them with
respect to a container
you just type like cd uv and then just
type in your file name
so that's kind of that's the hardware
i'm basically hardware software
the the resources i use for for this
stuff
so
examples um this is a super simple one
but
often times i'll get a text message from
my wife and she'll be like hey what are
the balances on all our accounts and to
start no i'm not like having the same
auto sign in to
bank or anything like that i'm not i'm
not building automated postage notes
that automatically own me um but what i
am doing is i'll have it read down the
line items of all of the aliases of the
bank accounts
so it'll say something like okay this is
uncle john's savings account this is our
pet dogs uh hsa etc and
you know then i can just
look at the at the screen of the browser
for the the balances and then another
screen that has like i don't know my my
android text message web portal right
and i can just type in like negative 600
you know negative 22 000 for balances
and uh
it's really it's it's useful just
because then you don't have to like
you know straddle straddle uh
account names versus numbers
something that i use all the time is
file name governance so this is an auto
hotkey script that i built but basically
if i just type date ff
it basically
starts up a file name that i'm building
with a month month underscore date date
underscore year underscore prefix so i
used to name my files like you know
uh python program underscore new
underscore new for real underscore new
for real
but broken
and
uh and that sucked but now if i type
like date ff uh client name for an
archive file then i can reference that
immediately by saying like cd ueuv
uh
date ff tab and then type in the client
number like i'm on the most current data
that i'm that i'm managing and if i
like if my downloads file which builds
up or my downloads folder builds up with
a ton of files i can still find what i'm
looking for and grab the hottest hottest
stuff
question so far is this making sense
hell yeah all right um
yeah bonuses uh if you guys use airflow
sometimes you need to like do a unit
test in airflow and you want to like
call yesterday's date you know just have
date yy or date date dd for
you know writing these things in a nice
human way
have you guys heard of the term
propinquity
okay propiquity is a weird thing it's uh
the
[Music]
the unconscious or subconscious
likelihood of using something because of
its spatial relationship to you so if
something has high propinquity it is in
a location that is where it will be
utilized often versus low propane video
or something you don't even know it
exists or you've forgotten that it's
that it still exists
and
when it comes to how i try yeah your
microphone cut out
let's see oh i flipped the switch my bad
all right thank you yeah thanks thanks
for the heads up um i got you back
hey were you guys able to hear me was i
projecting okay all right all right good
job
okay so um
when i consider propinquity i'm also
considering propinquity in the ducky pad
so this what you're seeing here is a
picture of the user interface for
putting your ducky scripts and like
labeling them and coloring the ducky pad
and what i'm doing here is everything
with a g underscore is a relationship to
um
like get so
all of these are get related commands
that get called based on
where they are so i have an idea of the
ideal or the default sequence that i
step through so like get fetches like
get fat get fetch get pull all in one
macro versus git status get commit get
pushed get out um but then you also have
something weird like get data which is
just like an aux said mix up that allows
me to copy and paste my git commit
reasons it like does a tree on the repo
and then it puts it in my clipboard well
okay no it doesn't put it in my
clipboard it it just calls that and then
i snag it you know just copy it put it
in my clipboard and then i call push to
prod and then it writes to you know hey
joe hey bob
uh here's what i'm intending to push
today all the little parameters that i
have and then it pastes in the directory
that i just changed so everyone can see
what i'm talking about the context is
all there
and what's nice about this is that like
you know i'm thinking about it and i'm
thinking okay i've pushed my code
through and now i just like click one
two three four five six and as every as
i'm watching it do that i can lean on my
subconsciousness it's like driving a car
and not trying to
solve the long division problem that my
teacher gave me in second grade um
so so i really like that and uh
like d email that
after i've like called push to prod it
builds out the email and then i can hit
this button optionally and it will
basically tab through outlook because i
don't want to look at the uis i don't
want to like spend my prefrontal cortex
ram like looking at an application this
just does the tab work steps through and
then sets the delay email to 8 am
because i'm an early worker that way
like nobody's doing like a uh
you know uh uh like
something needs to be pushed but it's
like not important so i don't want to
wake anybody up at like 3am
um
this is the meat and potato of easy win
for me because this was um
i decided to just automate all my
responses to recruiters so i was looking
i was entertaining new offers
and
the moment i did in the middle of like
returning to office season
uh i got like 17 recruiters like i'm not
i'm not a talented guy but uh i had like
17 recruiters reaching out to me all the
time
and
so i decided to make a sliding scale of
responses right so i would have one that
was like okay if someone offered me a
job where it's like fully remote two-day
work week and you know it allows you to
it's
yeah it's great then i can have a button
that says dazzle man it's just like yo i
love this opportunity i'd love to hear
the problems that these guys are solving
here's my resume here's my phone number
i'm going to be available at these times
for calls
and
what i love about this is like i'm one
of these people that gets very nervous
about
about responding to things particularly
like big game changers big wins
like new job offers that like if i just
went to the interview it would like bump
me up 20k which it did and i'm thankful
for that um
but uh
but being able to take the
procrastination and the
the the fear and the the cognitive
dissonance about reaching for something
that you know is strategically valuable
and just putting it into a button so you
don't have to think about it
um
i love that and then also you know for
for just removing the the chaff uh
you know you've got i only want remote
gigs or i only want python gigs or uh
jobs of the with a linux unix stack or
just i'm good
i'll reach into my network and see if i
can find somebody whose skills merit
that position
and and so yeah ultimately this allows
you to just step through the things that
you want and it's not necessarily about
just getting a job you can now cherry
pick among all the options and not leave
anything on the table because you're
just wanting to whine
making sense everybody good
cool
works for social maintenance too so
i'm somebody that like totally lets my
friendships degrade like the bridge of
the picture
and
like i'll just get tunnel vision on the
things that i'm focused on
so now what i can do is i can build
something that will say
um using like shift enter so i can type
it out in like an sms web portal or in
uh in linkedin or email just say this is
like jordan harbinger just saying like
hey guys hope this finds well um i'd
love to hear what you're working on no
rush on on a response but
hope you're doing well cheers peter
hayes
and it's been awesome because i've
reconnected with super old friends that
i haven't talked to in ages
um
and it's just been enriching the
experience
um because i've automated
i've increased the propity of uh of
reaching out to my friends and at the
same time it's like i said it and forget
it but then when i get a response you
know i'm i'm there for real
um risks passwords don't do it
i have to put that there just because
i don't need to address it but i do um
of course you've got the the
consideration of calling a script in the
wrong spot right so
if you have like let's go back to that
ducky pad picture
so you can you can set the pages for
this thing right and if you're on
something like
uh push to prod right when you mean to
mute the
mute microsoft teams
then you might do something
five minutes oh snap i'm sorry guys i
this is we're burning through this okay
yeah you can you can call a script in
the wrong spot just be judicious with
when you call your scripts
um but the rewards are pretty awesome if
you standardize
your your scripts you built them
premeditatedly you know that you're
gonna have a
succinct accurate flight checklist of
the things that you want to say to
somebody
also if it is premeditative you've got
diplomatic responses to things that you
necessarily don't necessarily want to be
diplomatic about sometimes
and then of course obscure bash command
flags so
you know if you if you have something
weird where you're using pandoc and you
don't use it often but you want to take
your markdown files and convert them
into pdfs you don't remember how to do
that you can just like macro that
um
i also like the fact that it's speed
with supervision
so if it is a one shot thing you know
you're not going to be building nearby
botnet where it like recurses and like
goes non-linear and like all sudden you
own all the
you know
security cameras in france
it's only gonna it has a start it has an
end it doesn't propagate it doesn't loop
or recurse
and if you've got something like that
then
you have a supervision so that it's not
propagating outside of your scope
but really the the cherry on top is the
instance of flex or the reflexive
instantiation of
getting getting stuff done if you if you
pull the wine out of it you just find
yourself doing things
so i was going to put up a github of all
my stuff i
um i didn't yet
but hit me up on linkedin if you like
otherwise um i'll put up the github and
if you add me on friendster or whatever
this is uh
i'll hook you up
so
thank you guys for listening to me and
if you've got questions i'm i'm all ears
for them now or otherwise i'll uh i'll
walk off stage
yeah what is your last name
eft
oh yeah here i'll pop that back up
yes
so it seemed like you might have had a
lot of scripts like fire and forget do
you have any of where it just fires up
and then you can
do like this
before you send it
yes yeah for many of them i do um let me
see if i've got an example
not a perfect example but for git commit
right
when i'll call git commit it will ask
for like a commit reason so i'll have to
type it all out into into terminal
and then just have like comments go here
between the quotes and not hit enter
and so then i just backspace out of that
and write down what i want same with
this uh this g data which is doing an
aux set pwd combo
it it basically treats the current
directory and then at the bottom echoes
what i'm writing about the
the current commit repository
and so yeah i just leave that space open
as well to type in what i want and then
yeah i just get the result
how do you balance out when the cost of
automation might exceed the cost of the
manual
that's a great question always always
trade your penny for a nickel never
never in reverse
so yeah most of these things and and
that's the cool
thing about it as well is that it gets
you have a second order effect right if
you're if you've got a pipeline for i
know that i'm going to be building a
macro that's a one shot
and you built that meta infrastructure
then that speed is going to increase
over time as well
so
if you lean on especially if you lean on
the tools that you know
and i'm not saying don't don't research
but
you know adopt more as
you get what i'm saying
okay thank you guys i really appreciate
good
[Music]
you