SlideShare a Scribd company logo
1 of 137
Download to read offline
Automate Yo' Self!
SeaGL 2016
Seattle, yo
John SJ Anderson
@genehack
if anybody has any questions or i'm going too fast, please throw up a hand and ask -- or grab me on the hallway
track
Hi, I'm John.
hi, i'm john
@genehack
i go by genehack most places on line.
today i'm going to talk to you today about some tools and tricks i have for being productive while developing. but
before i do that, i need to explain a bit about why i needed it. my life is busy.
Sammy
i've got a dog.
@sammygenehack
i've got a dog.
Two kids
two daughters
A Wife
and a wife that i like to hang out with
long-suffering conference widow
A Wife
photobomber is
not impressed.
A Wife
long-suffering conference widow
Job
I've also got a job
Hobbies
and i have a few hobbies -- maintain some Perl modules,
Hobbies
Trying to learn Swift, check out Angular 2,
Lots
of
Hobbies
reading, hiking, cooking,
I've got a lot of balls in the air
don't have time for trivial nonsense, so i use a lot of automation and other "lifehacks"
AUTOMATE YO' SELF
occasionally, you just have to automate yo' self!
Basic Principles
whenever i'm trying to do this, there are some basic principles that i try to keep in mind
Don't
Make
Me
Think
none of this automation stuff should require me to think -- if i have to think about it, it's not really saving me any time
This is my "you made me think" face.
the whole point is not having to think.
Consistency is Good.
so, in those terms, one thing that's essential: make everything the same. have a standard directory layout under $HOME. you shouldn't have to think about
what system you're on, what shell, what project. things should just be the same -- or at least *correct* -- all the time
Idempotence is better!
Idempotence: the property of certain operations in mathematics and computer science, that can be applied multiple times without changing the result
beyond the initial application
App::MiseEnPlace
so, here's an example of idempotence, a utility i wrote to manage symlinks and directories in my home directory
App::MiseEnPlace
"everything in its place"
"mise en place" is a French phrase meaning "everythng in its place" -- it comes from cooking, and the principle that you should have all your ingredients
prepped and ready to go before you start cooking. i wanted something to make sure i always had my standard directory layout under $HOME as well as
setting up various symlinks
% cat ~/.mise
---
manage:
- doc
- etc
- private
- proj/*
- src/*
create:
directories:
- bin
- proj
- proj/go/src/github.com/genehack
- src
- var
links:
- Desktop: var/tmp
- Desktop: tmp
here's what the top level config for mise looks like -- it goes in .mise in your home directory. we have a list of
directories we want to manage (more on that in a minute) and a set of directories and symlinks to create. links are
source:target
% cat proj/emacs/.mise
---
create:
links:
- DIR: ~/.emacs.d
- bin/build-most-recent-emacs: BIN
- bin/e: BIN
- bin/ec: BIN
- bin/git-blame-from-line-num: BIN
- bin/map-test-lib: BIN
this is a per-project config file. mise has a couple special keywords DIR and BIN, that refer to the directory
containing the .mise file and ~/bin, respectively
the advantage of this is you don't need to have a huge gnarly $PATH with a bunch of project directories in it,
everything is just symlinked into ~/bin
% mise
[LINK] created ~/proj/emacs -> ~/.emacs.d
[LINK] created ~/proj/emacs/bin/build-most-recent-emacs -> ~/bin/build-most-recent-emacs
[LINK] created ~/proj/emacs/bin/e -> ~/bin/e
[LINK] created ~/proj/emacs/bin/ec -> ~/bin/ec
[LINK] created ~/proj/emacs/bin/git-blame-from-line-num -> ~/bin/git-blame-from-line-num
[LINK] created ~/proj/emacs/bin/map-test-lib -> ~/bin/map-test-lib
% mise
% rm ~/bin/e
% mise
[LINK] created ~/proj/emacs/bin/e -> ~/bin/e
when we run mise for the first time, you can see it creates all those links. if we run it again, it does NOTHING.
Idempotency for the win! If you remove a link and run it again, it creates _just_ that link
App::MiseEnPlace
get it from your favorite CPAN mirror
available on CPAN, minimal dependencies, works on any perl from this decade.
smartcd
ok, so that handles getting a consistent directory structure, and linking project binaries. what if you have other per-project stuff that you want to set up?
environment variables or other stuff?
smartcd
Automatically run code when entering or
leaving directories or sub-directories
enter smartcd, which hooks the 'cd' command and then runs scripts when you enter or leave a directory (or even a subdirectory)
% smartcd show enter
/Users/genehack/.smartcd/scripts/Users/genehack/fake-node-proj/bash_enter exists
-------------------------------------------------------------------------
########################################################################
# smartcd enter - /Users/genehack/fake-node-proj
#
# This is a smartcd script. Commands you type will be run when you
# enter this directory. The string __PATH__ will be replaced with
# the current path. Some examples are editing your $PATH or creating
# a temporary alias:
#
# autostash PATH=__PATH__/bin:$PATH
# autostash alias restart="service stop; sleep 1; service start"
#
# See http://smartcd.org for more ideas about what can be put here
########################################################################
autostash NODE=4.2.3
autostash PATH=$PATH:__PATH__/node_modules/.bin/
nvm use $NODE
-------------------------------------------------------------------------
smartcd has 'edit' and 'show' subcmds (and a bunch of others), and 'leave' and 'enter' scripts. here's an enter script
for an arbitrary node project. the autostash keyword sets up an environment variable that will be *unset* when you
leave this directory. you can also run arbitrary commands; the 'nvm' command here selects a version of node to use
% smartcd show enter
/Users/genehack/.smartcd/scripts/Users/genehack/fake-node-proj/bash_enter exists
-------------------------------------------------------------------------
########################################################################
# smartcd enter - /Users/genehack/fake-node-proj
#
# This is a smartcd script. Commands you type will be run when you
# enter this directory. The string __PATH__ will be replaced with
# the current path. Some examples are editing your $PATH or creating
# a temporary alias:
#
# autostash PATH=__PATH__/bin:$PATH
# autostash alias restart="service stop; sleep 1; service start"
#
# See http://smartcd.org for more ideas about what can be put here
########################################################################
autostash NODE=4.2.3
autostash PATH=$PATH:__PATH__/node_modules/.bin/
nvm use $NODE
-------------------------------------------------------------------------
smartcd has 'edit' and 'show' subcmds (and a bunch of others), and 'leave' and 'enter' scripts. here's an enter script
for an arbitrary node project. the autostash keyword sets up an environment variable that will be *unset* when you
leave this directory. you can also run arbitrary commands; the 'nvm' command here selects a version of node to use
% smartcd show enter
/Users/genehack/.smartcd/scripts/Users/genehack/fake-node-proj/bash_enter exists
-------------------------------------------------------------------------
########################################################################
# smartcd enter - /Users/genehack/fake-node-proj
#
# This is a smartcd script. Commands you type will be run when you
# enter this directory. The string __PATH__ will be replaced with
# the current path. Some examples are editing your $PATH or creating
# a temporary alias:
#
# autostash PATH=__PATH__/bin:$PATH
# autostash alias restart="service stop; sleep 1; service start"
#
# See http://smartcd.org for more ideas about what can be put here
########################################################################
autostash NODE=4.2.3
autostash PATH=$PATH:__PATH__/node_modules/.bin/
nvm use $NODE
-------------------------------------------------------------------------
smartcd has 'edit' and 'show' subcmds (and a bunch of others), and 'leave' and 'enter' scripts. here's an enter script
for an arbitrary node project. the autostash keyword sets up an environment variable that will be *unset* when you
leave this directory. you can also run arbitrary commands; the 'nvm' command here selects a version of node to use
% cd ~/fake-node-proc
Now using node v4.2.3 (npm v2.14.7)
% echo xx$NODE
xx4.2.3
% cd ..
% echo xx$NODE
xx
here's what it looks like when you cd into that directory. and you can see the env var is set. if we change back out of
the directory, the environment variable is unset.
smartcd
https://github.com/cxreg/smartcd
pretty cool, available on github. works with bash and zsh. really easy to install.
i can pay this the highest possible compliment: i haven't forked it or needed to patch it in any way, i just use a checkout from the upstream repo
another option:
direnv
http://direnv.net/
https://github.com/direnv/direnv
another way to do this is called direnv
written in go, hooks into shells in a similar way
big difference: config stored _inside_ project directory
$ cd ~/my_project
$ echo ${FOO-nope}
nope
$ echo export FOO=foo > .envrc
.envrc is not allowed
$ direnv allow .
direnv: reloading
direnv: loading .envrc
direnv export: +FOO
$ echo ${FOO-nope}
foo
$ cd ..
direnv: unloading
direnv export: ~FOO
$ echo ${FOO-nope}
nope
direnv supports similar directory-specific env vars
$ cd ~/my_project
$ echo ${FOO-nope}
nope
$ echo export FOO=foo > .envrc
.envrc is not allowed
$ direnv allow .
direnv: reloading
direnv: loading .envrc
direnv export: +FOO
$ echo ${FOO-nope}
foo
$ cd ..
direnv: unloading
direnv export: ~FOo
$ echo ${FOO-nope}
nope
direnv supports similar directory-specific env vars
$ cd ~/my_project
$ echo ${FOO-nope}
nope
$ echo export FOO=foo > .envrc
.envrc is not allowed
$ direnv allow .
direnv: reloading
direnv: loading .envrc
direnv export: +FOO
$ echo ${FOO-nope}
foo
$ cd ..
direnv: unloading
direnv export: ~FOO
$ echo ${FOO-nope}
nope
direnv supports similar directory-specific env vars
direnv may be better for
collaborative projects.
direnv may be better for
collaborative projects?
get you
one that
can do
both?
App/Env
Builders
are
your
friends
speaking of per-project settings, let's talk for a minute about application builders.
perlbrew
plenv
rubyenv
nvm
App::GitGitr
build-most-
recent-emacs
here are some of the ones i've used or use now. perlbrew and plenv let you have multiple perls. nvm does the same thing for node. similar tools exist for
python, ruby, etc.
then there's GitGitr, which I wrote while maintaining Git wrapper library. I needed to be able to quickly install arbitrary Git versions while responding to bug
reports -- so I wrote a little tool that does that.
Similarly, I'm an Emacs user. If a new version is released, I want to upgrade, across all my systems - so I scripted that.
Consistency Corollary:
Don't trust system binaries
Back at the beginning, I said "consistency is good". Now, if you're developing on MacOS and deploying to Linux (or dev-ing on Ubuntu and deploying to
Debian), you're probably not going to have the same version of tool from the OS (and if you do now, it's not going to last). Even if the versions are the
same, there may have been vendor patches applied.
Automate building your
critical tools.
No, if you really want to be consistent, the best approach is to build the tools that are most critical for your project. ("Build" in this case may just mean
automating the install; it doesn't have to mean "build from source".) Note: only do this for the *important* stuff. (include examples)
The Silver Searcher
Speaking of tools, here's a tool that has literally improved my entire development life -- the silver searcher. Anybody
here using this?
grep?
ok, so, grep -- everybody knows grep, right? let's you search for text inside files, which is something you do a lot
while developing code.
powerful, speedy,
indiscriminate
so, grep is super powerful in terms of what you can search for, and it's pretty quick, but it's not very selective. you
can list all the files you want to search, or search whole dir trees, but you quickly realize this sucks, because of things
like .git directories. anybody ever do a recursive grep on a big git checkout? yeah.
ack?
anybody here use ack? ack is a grep-like tool written in perl.
powerful, selective,
slow
it's just as powerful as grep in terms of what you can search for, but it's recursive by default (which is what you want)
and it's smart about ignoring .git and SVN stuff. the problem is, it's pretty slow, particularly to start up (because
Perl)
ag!
enter ag (which is what the binary for the silver searcher is called.
powerful, selective,
FAST
ag works much like ack (not _exactly_, but close enough), but it's written in C and it's oh so fast.
The Silver Searcher
https://github.com/ggreer/the_silver_searcher
available on Github, also packaged in several Linux distros. again, no higher compliment than to say I just build
from a checkout of the upstream. have never needed to fork or patch
retraining
your
forearms
for fun & profit
karabiner, setting up keyboard driver to force correct shift key usage
My biggest productivity/automation tip
so, here's my single biggest tip in this whole talk. are you ready? brace yourselves.
revision control
$HOME
this is it. anybody know what this is?
this is your home directory under revision control
Why bother?
no, but seriously. it's a little bit of a pain to develop the discipline but once you get used to having _everything_
under revision control, it's nice. you don't have to worry about experimenting with anything, backing stuff up, or
dealing with cross-machine variation in your environments
say
automation
again
originally i had series of kludgy shell scripts to manage repo updates and checkouts
super ugly and not worth sharing
and then, inspiration: Ingy döt Net talking about App::AYCABTU @ PPW2010
Ingy döt Net
this is ingy - he's a crazy awesome open source hacker guy who has done a whole bunch of stuff. probably best
known for being one of the inventors of YAML
Things I wanted to steal
the thing ingy had developed had a bunch of stuff i wanted to steal:
The basic idea
The interface
Info about repositories in config file
Flexible ways of selecting repos for operations – by #, by name, by tag
Things I wanted to add	
Support for more than just Git
Locate repositories in arbitrary locations
Easily add and remove repositories
Ability to easily extend with more subcommands
Most importantly: better name!
App::AYCABTU?!?!‽
and finally, the name. what even is this.
GitGot
Thus was born GitGot
http://search.cpan.org/dist/App-GitGot/
Installs a ‘got’ command
Uses Moo and App::Cmd under the covers
Add new subcommands by writing a single class!
Whirlwind Tour
Let's take a whirlwind tour of how got works
got add
you tell got about repos using the 'add' command, from inside the git repo
% got add
Name: foo
URL:
Path: /Users/genehack/foo
Tags: bar
it'll prompt you for required info, and supply sensible defaults. note that you can also apply tags (space-delimited)
got add -D
or you can just add the '-D' switch and it'll automatically use the defaults
got clone <REPO URL>
you can also clone a remote repo, which will check it out into the working directory and add it to got, prompting
you for details
% got clone git@github.com:genehack/app-gitgot.git
Name: [app-gitgot]:
Path: [/Users/genehack/app-gitgot]:
Tags:
Cloning into '/Users/genehack/app-gitgot'...
it'll prompt you for required info, and supply sensible defaults. note that you can also apply tags (space-delimited)
got clone -D <REPO URL>
got clone also respects the '-D' switch
got fork <GITHUB URL>
finally, you can give got a github url, and it will fork that project under your github id, then check it out into the
current directory and add it to got
~/.gitgot
all the info about the repos managed by got lives in this .gitgot file in your home directory
- name: App-Amylase
path: /Users/genehack/proj/App-Amylase
repo: git@github.com:genehack/App-Amylase.git
type: git
- name: Git-Wrapper
path: /Users/genehack/proj/Git-Wrapper
repo: git@github.com:genehack/Git-Wrapper.git
tags: git
type: git
- name: HiD
path: /Users/genehack/proj/HiD
repo: git@github.com:genehack/HiD.git
type: git
- name: Perl-Build
path: /opt/plenv/plugins/perl-build
repo: git://github.com/tokuhirom/Perl-Build.git
type: git
it's just a simple YAML formatted line, totally hand-editable (although you shouldn't _need_ to do that, you can)
note that repos can be located anywhere on the disk, don't have to under a common dir or in your home or
whatever. anywhere you can write to is fair game
But now what?
ok, so you've added all your git repositories to got. what now?
got list
well, you can get a list of them
got ls
which you can shorten to this
1) App-Amylase git git@github.com:genehack/App-Amylase.git
2) Git-Wrapper git git@github.com:genehack/Git-Wrapper.git
3) HiD git git@github.com:genehack/HiD.git
4) Perl-Build git git://github.com/tokuhirom/Perl-Build.git
5) Perl-Critic git git@github.com:genehack/Perl-Critic.git
6) STAMPS git git@github.com:genehack/STAMPS.git
7) advanced-moose-class git ssh://git@git.iinteractive.com/train/advanced-moose-class.git
8) app-gitgitr git git@github.com:genehack/app-gitgitr.git
9) app-gitgot git git@github.com:genehack/app-gitgot.git
that'll get you this sort of listing.
got ls -q
if you don't want to see the upstream repo info, you can use the '-q' or '--quiet' switch
1) App-Amylase
2) Git-Wrapper
3) HiD
4) Perl-Build
5) Perl-Critic
6) STAMPS
7) advanced-moose-class
8) app-gitgitr
9) app-gitgot
and that'll get you this output.
note the numbers - those will give you a way to select repos for other commands
got ls [repos]
easiest way to demo that is with an example. you can restrict the listing
got ls 5
this will just list repo #5 for example
5) Perl-Critic
also, note that the list is always sorted the same way, so the numbers will be stable (unless you add new repos)
got ls 5-8
you can also give a range of repos
5) Perl-Critic
6) STAMPS
7) advanced-moose-class
8) app-gitgitr
and that'll give you that range, like you would expect
got ls HiD
you can also specify repos by name
3) HiD
got ls -t git
or by using tags. can specify multiple tags with multiple '-t' switches. they combine with 'or' semantics.
2) Git-Wrapper
8) app-gitgitr
9) app-gitgot
here are all the repos tagged with 'git' (at least in our example)
got ls 5-8 HiD 21 -t git
finally, you can combine all of these selection methods together. here we're asking for repos 5 thru 8, the repo
named HiD, repo 21, and all repos tagged with git
2) Git-Wrapper
3) HiD
5) Perl-Critic
6) STAMPS
7) advanced-moose-class
8) app-gitgitr
9) app-gitgot
21) etc
and this is what we get
note that most commands operate on all repos, and any that do, you can use these techniques to restrict the
command to a subset.
What else you got?
That's cool.
(no pun intended.)
got status
you can check the status of your repos.
*all* your repos
got st
or if you're into the whole brevity thing...
1) App-Amylase : OK
2) Git-Wrapper : OK
3) HiD : OK
4) Perl-Build : OK
5) Perl-Critic : OK
6) STAMPS : OK
7) advanced-moose-class : OK
8) app-gitgitr : OK
9) app-gitgot : OK
that'll get you output like this.
again, note the use of color to give quick visual cues
1) App-Amylase : OK
2) Git-Wrapper : OK
3) HiD : Dirty
4) Perl-Build : OK
5) Perl-Critic : OK
6) STAMPS : OK
7) advanced-moose-class : OK
8) app-gitgitr : OK
9) app-gitgot : OK
Dirty
got status will let you know if a repo has uncommitted changes.
super handy if, for example, working on one machine and are going to move to another one and want to see what
hasn't been committed.
1) App-Amylase : OK
2) Git-Wrapper : OK
3) HiD : OK
4) Perl-Build : OK
5) Perl-Critic : OK
6) STAMPS : OK Ahead by 1
7) advanced-moose-class : OK
8) app-gitgitr : OK
9) app-gitgot : OK
1) App-Amylase : OK
2) Git-Wrapper : OK
3) HiD : OK
4) Perl-Build : Dirty
5) Perl-Critic : OK
6) STAMPS : OK
7) advanced-moose-class : OK
8) app-gitgitr : OK
9) app-gitgot : OK
Dirty
1) App-Amylase : OK
2) Git-Wrapper : OK
3) HiD : OK
4) Perl-Build : OK
5) Perl-Critic : OK
6) STAMPS : OK Ahead by 1
7) advanced-moose-class : OK
8) app-gitgitr : OK
9) app-gitgot : OK
Ahead by 1
it'll also tell you if you have local commits that haven't been pushed to the remote yet
got st -q
finally, you can use the '-q' switch to hide the "uninteresting" stuff
got st -q
3) HiD : Dirty
6) STAMPS : OK Ahead by 1
Dirty
Ahead by 1
which in this case is all the repos that don't have changes and are up to date
got update
you can also run 'git pull' across all your repos
got up
which abbreviates to 'up'
and yeah, i should have called it pull but i'm a dummy and we're stuck with it now.
1) App-Amylase : Up to date
2) Git-Wrapper : Up to date
3) HiD : Up to date
4) Perl-Build : Updated
Updating 7f25f89..72587c8
Fast-forward
lib/Perl/Build.pm | 14 +++++++++++++-
script/perl-build | 14 +++++++++++++-
2 files changed, 26 insertions(+), 2 deletions(-)
5) Perl-Critic : Up to date
Updated
it'll do pretty much what you expect (and it supports '-q' too)
got update_status
finally, there's a command that combines both those, because it's something i do pretty frequent -- update
everything, then look at the status of everything
got upst
surprise - you can abbreviate that one too
got upst -q
and it also supports the '--quiet' option to only show you the interesting stuff
How much would you pay?
so, how much would you pay?
Wait, don't answer yet
got fetch
if you're not a fan of the way 'git pull' works you can also run 'git fetch' via got.
got push
you can even do a push across all your repos at once. (personally, this strikes me as insane but somebody sent in a
patch, so...)
got gc
you can garbage collect all your repos
got this
at some point, somebody sent in a patch to add 'got this' -- which tells you if the current directory is under got
control
% cd proj/HiD
% got this
4) HiD
got that <DIRECTORY>
this provoked somebody else to send in a 'got that' command, which does the same thing, but takes a path to
check
% got that ~/etc
37) etc
got chdir
finally, there are a number of commands that help you jump to the directory of a project. got chdir
got cd
also spelled 'got cd', will change your current working directory to the given repo (note that this is one of the few
got commands that requires a single repo)
got tmux
we also have tmux integration -- 'got tmux' will open a new tmux window with the working directory in your repo.
this _can_ be done with multiple repos. better, the tux window is persistent; as long as it's open 'got tmux' will just
select the already open window, not open a new one
got tmux -s
you can also spawn whole new tmux sessions if you prefer those to windows -- and again, those will be re-used as
long as they're around
How much
would
you pay
now
?
Good news!
It's free!
nothing!
Works on any perl
from the last 5 years
cpan App::GitGot
installation is simple
cpanm App::GitGot
can be even simpler
Find me at SeaGL and
I'll help you install!
or you can find me on the hallway track and i'll help you get it installed on your machine
Easy to extend
package App::GitGot::Command::chdir;
# ABSTRACT: open a subshell in a selected project
use 5.014;
use App::GitGot -command;
use Moo;
extends 'App::GitGot::Command';
use namespace::autoclean;
sub command_names { qw/ chdir cd / }
sub _execute {
my( $self, $opt, $args ) = @_;
unless ( $self->active_repos and $self->active_repos == 1 ) {
say STDERR 'ERROR: You need to select a single repo';
exit(1);
}
my( $repo ) = $self->active_repos;
chdir $repo->path
or say STDERR "ERROR: Failed to chdir to repo ($!)" and exit(1);
exec $ENV{SHELL};
}
1;
package App::GitGot::Command::chdir;
# ABSTRACT: open a subshell in a selected project
use Moo;
extends 'App::GitGot::Command';
sub command_names { qw/ chdir cd / }
sub _execute {
my( $self, $opt, $args ) = @_;
unless ( $self->active_repos and $self->active_repos == 1 ) {
say STDERR 'ERROR: You need to select a single repo';
exit(1);
}
my( $repo ) = $self->active_repos;
chdir $repo->path
or say STDERR "ERROR: Failed to chdir to repo ($!)"
and exit(1);
exec $ENV{SHELL};
}
package App::GitGot::Command::chdir;
# ABSTRACT: open a subshell in a selected project
use 5.014;
use App::GitGot -command;
use Moo;
extends 'App::GitGot::Command';
use namespace::autoclean;
sub command_names { qw/ chdir cd / }
sub _execute {
my( $self, $opt, $args ) = @_;
unless ( $self->active_repos and $self->active_repos == 1 ) {
say STDERR 'ERROR: You need to select a single repo';
exit(1);
}
my( $repo ) = $self->active_repos;
chdir $repo->path
or say STDERR "ERROR: Failed to chdir to repo ($!)" and exit(1);
exec $ENV{SHELL};
}
1;
Suggestions welcome!
areas for improvement:
support for other VCSen
better config management tools
any other crazy workflow improvement you can think of!
In conclusion…
notice the
speedbumps
in your life
…but it is a great way to learn a new language
You don't have to write a code…
can also just be about making
the wrong way harder
Thanks
SeaGL organizers
Ingy döt Net
Yanick Champoux
Michael Greb
Rolando Pereira
Chris Prather
photo credits:
all photos by speaker except
Ingy döt Net photo - https://www.flickr.com/photos/bulknews/389986053/
and pug - https://upload.wikimedia.org/wikipedia/commons/d/d7/Sad-pug.jpg
and automate yo'self - somewhere on the net
thanks to the company i work for for allowing me to (occasionally) mess with this stuff and sending me out to give these talks. holler at me on the hallway track if you're
looking for some Open Source consulting or staff augmentation
Questions?
as i said, i *love* to talk to people about this productivity type stuff, so grab me on the hallway track. i'm friendly.

More Related Content

What's hot

Масштабируемый и эффективный фаззинг Google Chrome
Масштабируемый и эффективный фаззинг Google ChromeМасштабируемый и эффективный фаззинг Google Chrome
Масштабируемый и эффективный фаззинг Google ChromePositive Hack Days
 
Infrastructure as code might be literally impossible part 2
Infrastructure as code might be literally impossible part 2Infrastructure as code might be literally impossible part 2
Infrastructure as code might be literally impossible part 2ice799
 
Windows Kernel Exploitation : This Time Font hunt you down in 4 bytes
Windows Kernel Exploitation : This Time Font hunt you down in 4 bytesWindows Kernel Exploitation : This Time Font hunt you down in 4 bytes
Windows Kernel Exploitation : This Time Font hunt you down in 4 bytesPeter Hlavaty
 
Power of linked list
Power of linked listPower of linked list
Power of linked listPeter Hlavaty
 
Puppet Camp LA 2/19/2015
Puppet Camp LA 2/19/2015Puppet Camp LA 2/19/2015
Puppet Camp LA 2/19/2015ice799
 
Package manages and Puppet - PuppetConf 2015
Package manages and Puppet - PuppetConf 2015Package manages and Puppet - PuppetConf 2015
Package manages and Puppet - PuppetConf 2015ice799
 
Статический анализ кода в контексте SSDL
Статический анализ кода в контексте SSDLСтатический анализ кода в контексте SSDL
Статический анализ кода в контексте SSDLPositive Hack Days
 
Racing The Web - Hackfest 2016
Racing The Web - Hackfest 2016Racing The Web - Hackfest 2016
Racing The Web - Hackfest 2016Aaron Hnatiw
 
DeathNote of Microsoft Windows Kernel
DeathNote of Microsoft Windows KernelDeathNote of Microsoft Windows Kernel
DeathNote of Microsoft Windows KernelPeter Hlavaty
 
Scalability, Fidelity and Stealth in the DRAKVUF Dynamic Malware Analysis System
Scalability, Fidelity and Stealth in the DRAKVUF Dynamic Malware Analysis SystemScalability, Fidelity and Stealth in the DRAKVUF Dynamic Malware Analysis System
Scalability, Fidelity and Stealth in the DRAKVUF Dynamic Malware Analysis SystemTamas K Lengyel
 
BH Arsenal '14 TurboTalk: The Veil-framework
BH Arsenal '14 TurboTalk: The Veil-frameworkBH Arsenal '14 TurboTalk: The Veil-framework
BH Arsenal '14 TurboTalk: The Veil-frameworkVeilFramework
 
Guardians of your CODE
Guardians of your CODEGuardians of your CODE
Guardians of your CODEPeter Hlavaty
 
50 Shades of Fuzzing by Peter Hlavaty & Marco Grassi
50 Shades of Fuzzing by Peter Hlavaty & Marco Grassi50 Shades of Fuzzing by Peter Hlavaty & Marco Grassi
50 Shades of Fuzzing by Peter Hlavaty & Marco GrassiShakacon
 
How to Root 10 Million Phones with One Exploit
How to Root 10 Million Phones with One ExploitHow to Root 10 Million Phones with One Exploit
How to Root 10 Million Phones with One ExploitJiahong Fang
 

What's hot (20)

Racing with Droids
Racing with DroidsRacing with Droids
Racing with Droids
 
Масштабируемый и эффективный фаззинг Google Chrome
Масштабируемый и эффективный фаззинг Google ChromeМасштабируемый и эффективный фаззинг Google Chrome
Масштабируемый и эффективный фаззинг Google Chrome
 
Infrastructure as code might be literally impossible part 2
Infrastructure as code might be literally impossible part 2Infrastructure as code might be literally impossible part 2
Infrastructure as code might be literally impossible part 2
 
Hello watchOS2
Hello watchOS2 Hello watchOS2
Hello watchOS2
 
Windows Kernel Exploitation : This Time Font hunt you down in 4 bytes
Windows Kernel Exploitation : This Time Font hunt you down in 4 bytesWindows Kernel Exploitation : This Time Font hunt you down in 4 bytes
Windows Kernel Exploitation : This Time Font hunt you down in 4 bytes
 
The Veil-Framework
The Veil-FrameworkThe Veil-Framework
The Veil-Framework
 
Vagrant and CentOS 7
Vagrant and CentOS 7Vagrant and CentOS 7
Vagrant and CentOS 7
 
Power of linked list
Power of linked listPower of linked list
Power of linked list
 
Puppet Camp LA 2/19/2015
Puppet Camp LA 2/19/2015Puppet Camp LA 2/19/2015
Puppet Camp LA 2/19/2015
 
Package manages and Puppet - PuppetConf 2015
Package manages and Puppet - PuppetConf 2015Package manages and Puppet - PuppetConf 2015
Package manages and Puppet - PuppetConf 2015
 
Статический анализ кода в контексте SSDL
Статический анализ кода в контексте SSDLСтатический анализ кода в контексте SSDL
Статический анализ кода в контексте SSDL
 
Racing The Web - Hackfest 2016
Racing The Web - Hackfest 2016Racing The Web - Hackfest 2016
Racing The Web - Hackfest 2016
 
DeathNote of Microsoft Windows Kernel
DeathNote of Microsoft Windows KernelDeathNote of Microsoft Windows Kernel
DeathNote of Microsoft Windows Kernel
 
Back to the CORE
Back to the COREBack to the CORE
Back to the CORE
 
Veil-Ordnance
Veil-OrdnanceVeil-Ordnance
Veil-Ordnance
 
Scalability, Fidelity and Stealth in the DRAKVUF Dynamic Malware Analysis System
Scalability, Fidelity and Stealth in the DRAKVUF Dynamic Malware Analysis SystemScalability, Fidelity and Stealth in the DRAKVUF Dynamic Malware Analysis System
Scalability, Fidelity and Stealth in the DRAKVUF Dynamic Malware Analysis System
 
BH Arsenal '14 TurboTalk: The Veil-framework
BH Arsenal '14 TurboTalk: The Veil-frameworkBH Arsenal '14 TurboTalk: The Veil-framework
BH Arsenal '14 TurboTalk: The Veil-framework
 
Guardians of your CODE
Guardians of your CODEGuardians of your CODE
Guardians of your CODE
 
50 Shades of Fuzzing by Peter Hlavaty & Marco Grassi
50 Shades of Fuzzing by Peter Hlavaty & Marco Grassi50 Shades of Fuzzing by Peter Hlavaty & Marco Grassi
50 Shades of Fuzzing by Peter Hlavaty & Marco Grassi
 
How to Root 10 Million Phones with One Exploit
How to Root 10 Million Phones with One ExploitHow to Root 10 Million Phones with One Exploit
How to Root 10 Million Phones with One Exploit
 

Viewers also liked

Supply Chain Planning maintains Scheduling | Inventory Planning
Supply Chain Planning maintains Scheduling | Inventory PlanningSupply Chain Planning maintains Scheduling | Inventory Planning
Supply Chain Planning maintains Scheduling | Inventory PlanningGamelover Bali
 
Pediatria - Seminário RN
Pediatria - Seminário RNPediatria - Seminário RN
Pediatria - Seminário RNPaulo Santos
 
Social Media Crash Course - Puget Sound Business Journal Seminar Series
Social Media Crash Course - Puget Sound Business Journal Seminar SeriesSocial Media Crash Course - Puget Sound Business Journal Seminar Series
Social Media Crash Course - Puget Sound Business Journal Seminar SeriesHeinz Marketing Inc
 
Grafico diario del dax perfomance index para el 08 05-2012
Grafico diario del dax perfomance index para el 08 05-2012Grafico diario del dax perfomance index para el 08 05-2012
Grafico diario del dax perfomance index para el 08 05-2012Experiencia Trading
 
Universidad nacional de chimborazo.docx tarjeta madre
Universidad nacional de chimborazo.docx tarjeta madreUniversidad nacional de chimborazo.docx tarjeta madre
Universidad nacional de chimborazo.docx tarjeta madrejhon pintag
 
Developing a PLN and open co-learning opportunities #UoRsocialmedia
Developing a PLN and open co-learning opportunities #UoRsocialmediaDeveloping a PLN and open co-learning opportunities #UoRsocialmedia
Developing a PLN and open co-learning opportunities #UoRsocialmediaSue Beckingham
 
How the Internet of Things Leads to Better, Faster Crisis Communication
 How the Internet of Things Leads to Better, Faster Crisis Communication How the Internet of Things Leads to Better, Faster Crisis Communication
How the Internet of Things Leads to Better, Faster Crisis CommunicationBlackBerry
 
Apple Days - A 1980’s perspective of Apple UK
Apple Days - A 1980’s perspective of Apple UKApple Days - A 1980’s perspective of Apple UK
Apple Days - A 1980’s perspective of Apple UKGary Potter
 
Child of the dark book review
Child of the dark book reviewChild of the dark book review
Child of the dark book reviewJustin A. Rigi
 
Paper for presentation
Paper for presentationPaper for presentation
Paper for presentationjoel osir
 
Exploration of Pipeline Water System in Doldoli Tea Garden and Its Feasibilit...
Exploration of Pipeline Water System in Doldoli Tea Garden and Its Feasibilit...Exploration of Pipeline Water System in Doldoli Tea Garden and Its Feasibilit...
Exploration of Pipeline Water System in Doldoli Tea Garden and Its Feasibilit...Shahadat Hossain Shakil
 
Dish 2011 Rene Tol V1.0
Dish 2011 Rene Tol V1.0Dish 2011 Rene Tol V1.0
Dish 2011 Rene Tol V1.0ReneTol
 
Arrogant Bastards Guide to Cloud Architecture
Arrogant Bastards Guide to Cloud ArchitectureArrogant Bastards Guide to Cloud Architecture
Arrogant Bastards Guide to Cloud Architectureevilmartini
 
MRP
MRPMRP
MRP8686
 
Creative Humanitarian Approaches To Poverty Alleviation And Sustainability: E...
Creative Humanitarian Approaches To Poverty Alleviation And Sustainability: E...Creative Humanitarian Approaches To Poverty Alleviation And Sustainability: E...
Creative Humanitarian Approaches To Poverty Alleviation And Sustainability: E...Dr. Chris Stout
 

Viewers also liked (19)

Supply Chain Planning maintains Scheduling | Inventory Planning
Supply Chain Planning maintains Scheduling | Inventory PlanningSupply Chain Planning maintains Scheduling | Inventory Planning
Supply Chain Planning maintains Scheduling | Inventory Planning
 
Pediatria - Seminário RN
Pediatria - Seminário RNPediatria - Seminário RN
Pediatria - Seminário RN
 
Social Media Crash Course - Puget Sound Business Journal Seminar Series
Social Media Crash Course - Puget Sound Business Journal Seminar SeriesSocial Media Crash Course - Puget Sound Business Journal Seminar Series
Social Media Crash Course - Puget Sound Business Journal Seminar Series
 
Grafico diario del dax perfomance index para el 08 05-2012
Grafico diario del dax perfomance index para el 08 05-2012Grafico diario del dax perfomance index para el 08 05-2012
Grafico diario del dax perfomance index para el 08 05-2012
 
Circuits 2011 in English
Circuits 2011 in EnglishCircuits 2011 in English
Circuits 2011 in English
 
Ronak ppt
Ronak pptRonak ppt
Ronak ppt
 
Universidad nacional de chimborazo.docx tarjeta madre
Universidad nacional de chimborazo.docx tarjeta madreUniversidad nacional de chimborazo.docx tarjeta madre
Universidad nacional de chimborazo.docx tarjeta madre
 
Developing a PLN and open co-learning opportunities #UoRsocialmedia
Developing a PLN and open co-learning opportunities #UoRsocialmediaDeveloping a PLN and open co-learning opportunities #UoRsocialmedia
Developing a PLN and open co-learning opportunities #UoRsocialmedia
 
How the Internet of Things Leads to Better, Faster Crisis Communication
 How the Internet of Things Leads to Better, Faster Crisis Communication How the Internet of Things Leads to Better, Faster Crisis Communication
How the Internet of Things Leads to Better, Faster Crisis Communication
 
Apple Days - A 1980’s perspective of Apple UK
Apple Days - A 1980’s perspective of Apple UKApple Days - A 1980’s perspective of Apple UK
Apple Days - A 1980’s perspective of Apple UK
 
Child of the dark book review
Child of the dark book reviewChild of the dark book review
Child of the dark book review
 
Paper for presentation
Paper for presentationPaper for presentation
Paper for presentation
 
Exploration of Pipeline Water System in Doldoli Tea Garden and Its Feasibilit...
Exploration of Pipeline Water System in Doldoli Tea Garden and Its Feasibilit...Exploration of Pipeline Water System in Doldoli Tea Garden and Its Feasibilit...
Exploration of Pipeline Water System in Doldoli Tea Garden and Its Feasibilit...
 
Dish 2011 Rene Tol V1.0
Dish 2011 Rene Tol V1.0Dish 2011 Rene Tol V1.0
Dish 2011 Rene Tol V1.0
 
Google analytics 2
Google analytics 2Google analytics 2
Google analytics 2
 
Arrogant Bastards Guide to Cloud Architecture
Arrogant Bastards Guide to Cloud ArchitectureArrogant Bastards Guide to Cloud Architecture
Arrogant Bastards Guide to Cloud Architecture
 
MRP
MRPMRP
MRP
 
Career vs Health
Career vs HealthCareer vs Health
Career vs Health
 
Creative Humanitarian Approaches To Poverty Alleviation And Sustainability: E...
Creative Humanitarian Approaches To Poverty Alleviation And Sustainability: E...Creative Humanitarian Approaches To Poverty Alleviation And Sustainability: E...
Creative Humanitarian Approaches To Poverty Alleviation And Sustainability: E...
 

Similar to Automate Yo'self -- SeaGL

Node.js basics
Node.js basicsNode.js basics
Node.js basicsBen Lin
 
Makefiles in 2020 — Why they still matter
Makefiles in 2020 — Why they still matterMakefiles in 2020 — Why they still matter
Makefiles in 2020 — Why they still matterSimon Brüggen
 
May The Nodejs Be With You
May The Nodejs Be With YouMay The Nodejs Be With You
May The Nodejs Be With YouDalibor Gogic
 
A General Purpose Docker Image for PHP
A General Purpose Docker Image for PHPA General Purpose Docker Image for PHP
A General Purpose Docker Image for PHPRobert Lemke
 
Buildout: Fostering Repeatability
Buildout: Fostering RepeatabilityBuildout: Fostering Repeatability
Buildout: Fostering RepeatabilityClayton Parker
 
Django dev-env-my-way
Django dev-env-my-wayDjango dev-env-my-way
Django dev-env-my-wayRobert Lujo
 
[MeetUp][2nd] 컭on턺
[MeetUp][2nd] 컭on턺[MeetUp][2nd] 컭on턺
[MeetUp][2nd] 컭on턺InfraEngineer
 
Scripting for infosecs
Scripting for infosecsScripting for infosecs
Scripting for infosecsnancysuemartin
 
Rapid Prototyping FTW!!!
Rapid Prototyping FTW!!!Rapid Prototyping FTW!!!
Rapid Prototyping FTW!!!cloudbring
 
Deploying Symfony | symfony.cat
Deploying Symfony | symfony.catDeploying Symfony | symfony.cat
Deploying Symfony | symfony.catPablo Godel
 
Toolbox of a Ruby Team
Toolbox of a Ruby TeamToolbox of a Ruby Team
Toolbox of a Ruby TeamArto Artnik
 
Getting Started with Ansible - Jake.pdf
Getting Started with Ansible - Jake.pdfGetting Started with Ansible - Jake.pdf
Getting Started with Ansible - Jake.pdfssuserd254491
 
How I hack on puppet modules
How I hack on puppet modulesHow I hack on puppet modules
How I hack on puppet modulesKris Buytaert
 
Composer: putting dependencies on the score
Composer: putting dependencies on the scoreComposer: putting dependencies on the score
Composer: putting dependencies on the scoreRafael Dohms
 
Puppet Camp Düsseldorf 2014: Continuously Deliver Your Puppet Code with Jenki...
Puppet Camp Düsseldorf 2014: Continuously Deliver Your Puppet Code with Jenki...Puppet Camp Düsseldorf 2014: Continuously Deliver Your Puppet Code with Jenki...
Puppet Camp Düsseldorf 2014: Continuously Deliver Your Puppet Code with Jenki...Puppet
 
Puppet Camp Duesseldorf 2014: Toni Schmidbauer - Continuously deliver your pu...
Puppet Camp Duesseldorf 2014: Toni Schmidbauer - Continuously deliver your pu...Puppet Camp Duesseldorf 2014: Toni Schmidbauer - Continuously deliver your pu...
Puppet Camp Duesseldorf 2014: Toni Schmidbauer - Continuously deliver your pu...NETWAYS
 
macos installation automation
macos installation automationmacos installation automation
macos installation automationJon Fuller
 
NYPHP March 2009 Presentation
NYPHP March 2009 PresentationNYPHP March 2009 Presentation
NYPHP March 2009 Presentationbrian_dailey
 

Similar to Automate Yo'self -- SeaGL (20)

Automate Yo' Self
Automate Yo' SelfAutomate Yo' Self
Automate Yo' Self
 
Node.js basics
Node.js basicsNode.js basics
Node.js basics
 
Git::Hooks
Git::HooksGit::Hooks
Git::Hooks
 
Makefiles in 2020 — Why they still matter
Makefiles in 2020 — Why they still matterMakefiles in 2020 — Why they still matter
Makefiles in 2020 — Why they still matter
 
May The Nodejs Be With You
May The Nodejs Be With YouMay The Nodejs Be With You
May The Nodejs Be With You
 
A General Purpose Docker Image for PHP
A General Purpose Docker Image for PHPA General Purpose Docker Image for PHP
A General Purpose Docker Image for PHP
 
Buildout: Fostering Repeatability
Buildout: Fostering RepeatabilityBuildout: Fostering Repeatability
Buildout: Fostering Repeatability
 
Django dev-env-my-way
Django dev-env-my-wayDjango dev-env-my-way
Django dev-env-my-way
 
[MeetUp][2nd] 컭on턺
[MeetUp][2nd] 컭on턺[MeetUp][2nd] 컭on턺
[MeetUp][2nd] 컭on턺
 
Scripting for infosecs
Scripting for infosecsScripting for infosecs
Scripting for infosecs
 
Rapid Prototyping FTW!!!
Rapid Prototyping FTW!!!Rapid Prototyping FTW!!!
Rapid Prototyping FTW!!!
 
Deploying Symfony | symfony.cat
Deploying Symfony | symfony.catDeploying Symfony | symfony.cat
Deploying Symfony | symfony.cat
 
Toolbox of a Ruby Team
Toolbox of a Ruby TeamToolbox of a Ruby Team
Toolbox of a Ruby Team
 
Getting Started with Ansible - Jake.pdf
Getting Started with Ansible - Jake.pdfGetting Started with Ansible - Jake.pdf
Getting Started with Ansible - Jake.pdf
 
How I hack on puppet modules
How I hack on puppet modulesHow I hack on puppet modules
How I hack on puppet modules
 
Composer: putting dependencies on the score
Composer: putting dependencies on the scoreComposer: putting dependencies on the score
Composer: putting dependencies on the score
 
Puppet Camp Düsseldorf 2014: Continuously Deliver Your Puppet Code with Jenki...
Puppet Camp Düsseldorf 2014: Continuously Deliver Your Puppet Code with Jenki...Puppet Camp Düsseldorf 2014: Continuously Deliver Your Puppet Code with Jenki...
Puppet Camp Düsseldorf 2014: Continuously Deliver Your Puppet Code with Jenki...
 
Puppet Camp Duesseldorf 2014: Toni Schmidbauer - Continuously deliver your pu...
Puppet Camp Duesseldorf 2014: Toni Schmidbauer - Continuously deliver your pu...Puppet Camp Duesseldorf 2014: Toni Schmidbauer - Continuously deliver your pu...
Puppet Camp Duesseldorf 2014: Toni Schmidbauer - Continuously deliver your pu...
 
macos installation automation
macos installation automationmacos installation automation
macos installation automation
 
NYPHP March 2009 Presentation
NYPHP March 2009 PresentationNYPHP March 2009 Presentation
NYPHP March 2009 Presentation
 

More from John Anderson

Introduction to Git (even for non-developers)
Introduction to Git (even for non-developers)Introduction to Git (even for non-developers)
Introduction to Git (even for non-developers)John Anderson
 
Logs are-magic-devfestweekend2018
Logs are-magic-devfestweekend2018Logs are-magic-devfestweekend2018
Logs are-magic-devfestweekend2018John Anderson
 
Logs Are Magic: Why Git Workflows and Commit Structure Should Matter To You
Logs Are Magic: Why Git Workflows and Commit Structure Should Matter To YouLogs Are Magic: Why Git Workflows and Commit Structure Should Matter To You
Logs Are Magic: Why Git Workflows and Commit Structure Should Matter To YouJohn Anderson
 
A static site generator should be your next language learning project
A static site generator should be your next language learning projectA static site generator should be your next language learning project
A static site generator should be your next language learning projectJohn Anderson
 
Do you want to be right or do you want to WIN?
Do you want to be right or do you want to WIN?Do you want to be right or do you want to WIN?
Do you want to be right or do you want to WIN?John Anderson
 
An Introduction to Git (even for non-developers)
An Introduction to Git (even for non-developers)An Introduction to Git (even for non-developers)
An Introduction to Git (even for non-developers)John Anderson
 
You got chocolate in my peanut butter! .NET on Mac & Linux
You got chocolate in my peanut butter! .NET on Mac & LinuxYou got chocolate in my peanut butter! .NET on Mac & Linux
You got chocolate in my peanut butter! .NET on Mac & LinuxJohn Anderson
 
A static site generator should be your next language learning project
A static site generator should be your next language learning projectA static site generator should be your next language learning project
A static site generator should be your next language learning projectJohn Anderson
 
Old Dogs & New Tricks: What's New with Perl5 This Century
Old Dogs & New Tricks: What's New with Perl5 This CenturyOld Dogs & New Tricks: What's New with Perl5 This Century
Old Dogs & New Tricks: What's New with Perl5 This CenturyJohn Anderson
 
Introduction to Git (even for non-developers!)
Introduction to Git (even for non-developers!)Introduction to Git (even for non-developers!)
Introduction to Git (even for non-developers!)John Anderson
 
Introduction to Git for Non-Developers
Introduction to Git for Non-DevelopersIntroduction to Git for Non-Developers
Introduction to Git for Non-DevelopersJohn Anderson
 
A Modest Introduction To Swift
A Modest Introduction To SwiftA Modest Introduction To Swift
A Modest Introduction To SwiftJohn Anderson
 
A static site generator should be your next language learning project
A static site generator should be your next language learning projectA static site generator should be your next language learning project
A static site generator should be your next language learning projectJohn Anderson
 
Logs Are Magic: Why Git Workflows and Commit Structure Should Matter To You
Logs Are Magic: Why Git Workflows and Commit Structure Should Matter To YouLogs Are Magic: Why Git Workflows and Commit Structure Should Matter To You
Logs Are Magic: Why Git Workflows and Commit Structure Should Matter To YouJohn Anderson
 
JSON Web Tokens Will Improve Your Life
JSON Web Tokens Will Improve Your LifeJSON Web Tokens Will Improve Your Life
JSON Web Tokens Will Improve Your LifeJohn Anderson
 
Old Dogs & New Tricks: What's New With Perl5 This Century
Old Dogs & New Tricks: What's New With Perl5 This CenturyOld Dogs & New Tricks: What's New With Perl5 This Century
Old Dogs & New Tricks: What's New With Perl5 This CenturyJohn Anderson
 
A Modest Introduction to Swift
A Modest Introduction to SwiftA Modest Introduction to Swift
A Modest Introduction to SwiftJohn Anderson
 
Logs Are Magic: Why Git Workflows and Commit Structure Should Matter To You
Logs Are Magic: Why Git Workflows and Commit Structure Should Matter To YouLogs Are Magic: Why Git Workflows and Commit Structure Should Matter To You
Logs Are Magic: Why Git Workflows and Commit Structure Should Matter To YouJohn Anderson
 
Friends Don't Let Friends Browse Unencrypted: Running a VPN for friends and f...
Friends Don't Let Friends Browse Unencrypted: Running a VPN for friends and f...Friends Don't Let Friends Browse Unencrypted: Running a VPN for friends and f...
Friends Don't Let Friends Browse Unencrypted: Running a VPN for friends and f...John Anderson
 

More from John Anderson (20)

#speakerlife
#speakerlife#speakerlife
#speakerlife
 
Introduction to Git (even for non-developers)
Introduction to Git (even for non-developers)Introduction to Git (even for non-developers)
Introduction to Git (even for non-developers)
 
Logs are-magic-devfestweekend2018
Logs are-magic-devfestweekend2018Logs are-magic-devfestweekend2018
Logs are-magic-devfestweekend2018
 
Logs Are Magic: Why Git Workflows and Commit Structure Should Matter To You
Logs Are Magic: Why Git Workflows and Commit Structure Should Matter To YouLogs Are Magic: Why Git Workflows and Commit Structure Should Matter To You
Logs Are Magic: Why Git Workflows and Commit Structure Should Matter To You
 
A static site generator should be your next language learning project
A static site generator should be your next language learning projectA static site generator should be your next language learning project
A static site generator should be your next language learning project
 
Do you want to be right or do you want to WIN?
Do you want to be right or do you want to WIN?Do you want to be right or do you want to WIN?
Do you want to be right or do you want to WIN?
 
An Introduction to Git (even for non-developers)
An Introduction to Git (even for non-developers)An Introduction to Git (even for non-developers)
An Introduction to Git (even for non-developers)
 
You got chocolate in my peanut butter! .NET on Mac & Linux
You got chocolate in my peanut butter! .NET on Mac & LinuxYou got chocolate in my peanut butter! .NET on Mac & Linux
You got chocolate in my peanut butter! .NET on Mac & Linux
 
A static site generator should be your next language learning project
A static site generator should be your next language learning projectA static site generator should be your next language learning project
A static site generator should be your next language learning project
 
Old Dogs & New Tricks: What's New with Perl5 This Century
Old Dogs & New Tricks: What's New with Perl5 This CenturyOld Dogs & New Tricks: What's New with Perl5 This Century
Old Dogs & New Tricks: What's New with Perl5 This Century
 
Introduction to Git (even for non-developers!)
Introduction to Git (even for non-developers!)Introduction to Git (even for non-developers!)
Introduction to Git (even for non-developers!)
 
Introduction to Git for Non-Developers
Introduction to Git for Non-DevelopersIntroduction to Git for Non-Developers
Introduction to Git for Non-Developers
 
A Modest Introduction To Swift
A Modest Introduction To SwiftA Modest Introduction To Swift
A Modest Introduction To Swift
 
A static site generator should be your next language learning project
A static site generator should be your next language learning projectA static site generator should be your next language learning project
A static site generator should be your next language learning project
 
Logs Are Magic: Why Git Workflows and Commit Structure Should Matter To You
Logs Are Magic: Why Git Workflows and Commit Structure Should Matter To YouLogs Are Magic: Why Git Workflows and Commit Structure Should Matter To You
Logs Are Magic: Why Git Workflows and Commit Structure Should Matter To You
 
JSON Web Tokens Will Improve Your Life
JSON Web Tokens Will Improve Your LifeJSON Web Tokens Will Improve Your Life
JSON Web Tokens Will Improve Your Life
 
Old Dogs & New Tricks: What's New With Perl5 This Century
Old Dogs & New Tricks: What's New With Perl5 This CenturyOld Dogs & New Tricks: What's New With Perl5 This Century
Old Dogs & New Tricks: What's New With Perl5 This Century
 
A Modest Introduction to Swift
A Modest Introduction to SwiftA Modest Introduction to Swift
A Modest Introduction to Swift
 
Logs Are Magic: Why Git Workflows and Commit Structure Should Matter To You
Logs Are Magic: Why Git Workflows and Commit Structure Should Matter To YouLogs Are Magic: Why Git Workflows and Commit Structure Should Matter To You
Logs Are Magic: Why Git Workflows and Commit Structure Should Matter To You
 
Friends Don't Let Friends Browse Unencrypted: Running a VPN for friends and f...
Friends Don't Let Friends Browse Unencrypted: Running a VPN for friends and f...Friends Don't Let Friends Browse Unencrypted: Running a VPN for friends and f...
Friends Don't Let Friends Browse Unencrypted: Running a VPN for friends and f...
 

Recently uploaded

Real Men Wear Diapers T Shirts sweatshirt
Real Men Wear Diapers T Shirts sweatshirtReal Men Wear Diapers T Shirts sweatshirt
Real Men Wear Diapers T Shirts sweatshirtrahman018755
 
Best SEO Services Company in Dallas | Best SEO Agency Dallas
Best SEO Services Company in Dallas | Best SEO Agency DallasBest SEO Services Company in Dallas | Best SEO Agency Dallas
Best SEO Services Company in Dallas | Best SEO Agency DallasDigicorns Technologies
 
Russian Call girls in Abu Dhabi 0508644382 Abu Dhabi Call girls
Russian Call girls in Abu Dhabi 0508644382 Abu Dhabi Call girlsRussian Call girls in Abu Dhabi 0508644382 Abu Dhabi Call girls
Russian Call girls in Abu Dhabi 0508644382 Abu Dhabi Call girlsMonica Sydney
 
best call girls in Hyderabad Finest Escorts Service 📞 9352988975 📞 Available ...
best call girls in Hyderabad Finest Escorts Service 📞 9352988975 📞 Available ...best call girls in Hyderabad Finest Escorts Service 📞 9352988975 📞 Available ...
best call girls in Hyderabad Finest Escorts Service 📞 9352988975 📞 Available ...kajalverma014
 
20240510 QFM016 Irresponsible AI Reading List April 2024.pdf
20240510 QFM016 Irresponsible AI Reading List April 2024.pdf20240510 QFM016 Irresponsible AI Reading List April 2024.pdf
20240510 QFM016 Irresponsible AI Reading List April 2024.pdfMatthew Sinclair
 
PowerDirector Explination Process...pptx
PowerDirector Explination Process...pptxPowerDirector Explination Process...pptx
PowerDirector Explination Process...pptxgalaxypingy
 
pdfcoffee.com_business-ethics-q3m7-pdf-free.pdf
pdfcoffee.com_business-ethics-q3m7-pdf-free.pdfpdfcoffee.com_business-ethics-q3m7-pdf-free.pdf
pdfcoffee.com_business-ethics-q3m7-pdf-free.pdfJOHNBEBONYAP1
 
APNIC Policy Roundup, presented by Sunny Chendi at the 5th ICANN APAC-TWNIC E...
APNIC Policy Roundup, presented by Sunny Chendi at the 5th ICANN APAC-TWNIC E...APNIC Policy Roundup, presented by Sunny Chendi at the 5th ICANN APAC-TWNIC E...
APNIC Policy Roundup, presented by Sunny Chendi at the 5th ICANN APAC-TWNIC E...APNIC
 
2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs
2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs
2nd Solid Symposium: Solid Pods vs Personal Knowledge GraphsEleniIlkou
 
在线制作约克大学毕业证(yu毕业证)在读证明认证可查
在线制作约克大学毕业证(yu毕业证)在读证明认证可查在线制作约克大学毕业证(yu毕业证)在读证明认证可查
在线制作约克大学毕业证(yu毕业证)在读证明认证可查ydyuyu
 
"Boost Your Digital Presence: Partner with a Leading SEO Agency"
"Boost Your Digital Presence: Partner with a Leading SEO Agency""Boost Your Digital Presence: Partner with a Leading SEO Agency"
"Boost Your Digital Presence: Partner with a Leading SEO Agency"growthgrids
 
Indian Escort in Abu DHabi 0508644382 Abu Dhabi Escorts
Indian Escort in Abu DHabi 0508644382 Abu Dhabi EscortsIndian Escort in Abu DHabi 0508644382 Abu Dhabi Escorts
Indian Escort in Abu DHabi 0508644382 Abu Dhabi EscortsMonica Sydney
 
Story Board.pptxrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
Story Board.pptxrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrStory Board.pptxrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
Story Board.pptxrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrHenryBriggs2
 
一比一原版(Flinders毕业证书)弗林德斯大学毕业证原件一模一样
一比一原版(Flinders毕业证书)弗林德斯大学毕业证原件一模一样一比一原版(Flinders毕业证书)弗林德斯大学毕业证原件一模一样
一比一原版(Flinders毕业证书)弗林德斯大学毕业证原件一模一样ayvbos
 
75539-Cyber Security Challenges PPT.pptx
75539-Cyber Security Challenges PPT.pptx75539-Cyber Security Challenges PPT.pptx
75539-Cyber Security Challenges PPT.pptxAsmae Rabhi
 
Nagercoil Escorts Service Girl ^ 9332606886, WhatsApp Anytime Nagercoil
Nagercoil Escorts Service Girl ^ 9332606886, WhatsApp Anytime NagercoilNagercoil Escorts Service Girl ^ 9332606886, WhatsApp Anytime Nagercoil
Nagercoil Escorts Service Girl ^ 9332606886, WhatsApp Anytime Nagercoilmeghakumariji156
 
APNIC Updates presented by Paul Wilson at ARIN 53
APNIC Updates presented by Paul Wilson at ARIN 53APNIC Updates presented by Paul Wilson at ARIN 53
APNIC Updates presented by Paul Wilson at ARIN 53APNIC
 
Power point inglese - educazione civica di Nuria Iuzzolino
Power point inglese - educazione civica di Nuria IuzzolinoPower point inglese - educazione civica di Nuria Iuzzolino
Power point inglese - educazione civica di Nuria Iuzzolinonuriaiuzzolino1
 
Vip Firozabad Phone 8250092165 Escorts Service At 6k To 30k Along With Ac Room
Vip Firozabad Phone 8250092165 Escorts Service At 6k To 30k Along With Ac RoomVip Firozabad Phone 8250092165 Escorts Service At 6k To 30k Along With Ac Room
Vip Firozabad Phone 8250092165 Escorts Service At 6k To 30k Along With Ac Roommeghakumariji156
 
一比一原版(Curtin毕业证书)科廷大学毕业证原件一模一样
一比一原版(Curtin毕业证书)科廷大学毕业证原件一模一样一比一原版(Curtin毕业证书)科廷大学毕业证原件一模一样
一比一原版(Curtin毕业证书)科廷大学毕业证原件一模一样ayvbos
 

Recently uploaded (20)

Real Men Wear Diapers T Shirts sweatshirt
Real Men Wear Diapers T Shirts sweatshirtReal Men Wear Diapers T Shirts sweatshirt
Real Men Wear Diapers T Shirts sweatshirt
 
Best SEO Services Company in Dallas | Best SEO Agency Dallas
Best SEO Services Company in Dallas | Best SEO Agency DallasBest SEO Services Company in Dallas | Best SEO Agency Dallas
Best SEO Services Company in Dallas | Best SEO Agency Dallas
 
Russian Call girls in Abu Dhabi 0508644382 Abu Dhabi Call girls
Russian Call girls in Abu Dhabi 0508644382 Abu Dhabi Call girlsRussian Call girls in Abu Dhabi 0508644382 Abu Dhabi Call girls
Russian Call girls in Abu Dhabi 0508644382 Abu Dhabi Call girls
 
best call girls in Hyderabad Finest Escorts Service 📞 9352988975 📞 Available ...
best call girls in Hyderabad Finest Escorts Service 📞 9352988975 📞 Available ...best call girls in Hyderabad Finest Escorts Service 📞 9352988975 📞 Available ...
best call girls in Hyderabad Finest Escorts Service 📞 9352988975 📞 Available ...
 
20240510 QFM016 Irresponsible AI Reading List April 2024.pdf
20240510 QFM016 Irresponsible AI Reading List April 2024.pdf20240510 QFM016 Irresponsible AI Reading List April 2024.pdf
20240510 QFM016 Irresponsible AI Reading List April 2024.pdf
 
PowerDirector Explination Process...pptx
PowerDirector Explination Process...pptxPowerDirector Explination Process...pptx
PowerDirector Explination Process...pptx
 
pdfcoffee.com_business-ethics-q3m7-pdf-free.pdf
pdfcoffee.com_business-ethics-q3m7-pdf-free.pdfpdfcoffee.com_business-ethics-q3m7-pdf-free.pdf
pdfcoffee.com_business-ethics-q3m7-pdf-free.pdf
 
APNIC Policy Roundup, presented by Sunny Chendi at the 5th ICANN APAC-TWNIC E...
APNIC Policy Roundup, presented by Sunny Chendi at the 5th ICANN APAC-TWNIC E...APNIC Policy Roundup, presented by Sunny Chendi at the 5th ICANN APAC-TWNIC E...
APNIC Policy Roundup, presented by Sunny Chendi at the 5th ICANN APAC-TWNIC E...
 
2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs
2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs
2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs
 
在线制作约克大学毕业证(yu毕业证)在读证明认证可查
在线制作约克大学毕业证(yu毕业证)在读证明认证可查在线制作约克大学毕业证(yu毕业证)在读证明认证可查
在线制作约克大学毕业证(yu毕业证)在读证明认证可查
 
"Boost Your Digital Presence: Partner with a Leading SEO Agency"
"Boost Your Digital Presence: Partner with a Leading SEO Agency""Boost Your Digital Presence: Partner with a Leading SEO Agency"
"Boost Your Digital Presence: Partner with a Leading SEO Agency"
 
Indian Escort in Abu DHabi 0508644382 Abu Dhabi Escorts
Indian Escort in Abu DHabi 0508644382 Abu Dhabi EscortsIndian Escort in Abu DHabi 0508644382 Abu Dhabi Escorts
Indian Escort in Abu DHabi 0508644382 Abu Dhabi Escorts
 
Story Board.pptxrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
Story Board.pptxrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrStory Board.pptxrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
Story Board.pptxrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
 
一比一原版(Flinders毕业证书)弗林德斯大学毕业证原件一模一样
一比一原版(Flinders毕业证书)弗林德斯大学毕业证原件一模一样一比一原版(Flinders毕业证书)弗林德斯大学毕业证原件一模一样
一比一原版(Flinders毕业证书)弗林德斯大学毕业证原件一模一样
 
75539-Cyber Security Challenges PPT.pptx
75539-Cyber Security Challenges PPT.pptx75539-Cyber Security Challenges PPT.pptx
75539-Cyber Security Challenges PPT.pptx
 
Nagercoil Escorts Service Girl ^ 9332606886, WhatsApp Anytime Nagercoil
Nagercoil Escorts Service Girl ^ 9332606886, WhatsApp Anytime NagercoilNagercoil Escorts Service Girl ^ 9332606886, WhatsApp Anytime Nagercoil
Nagercoil Escorts Service Girl ^ 9332606886, WhatsApp Anytime Nagercoil
 
APNIC Updates presented by Paul Wilson at ARIN 53
APNIC Updates presented by Paul Wilson at ARIN 53APNIC Updates presented by Paul Wilson at ARIN 53
APNIC Updates presented by Paul Wilson at ARIN 53
 
Power point inglese - educazione civica di Nuria Iuzzolino
Power point inglese - educazione civica di Nuria IuzzolinoPower point inglese - educazione civica di Nuria Iuzzolino
Power point inglese - educazione civica di Nuria Iuzzolino
 
Vip Firozabad Phone 8250092165 Escorts Service At 6k To 30k Along With Ac Room
Vip Firozabad Phone 8250092165 Escorts Service At 6k To 30k Along With Ac RoomVip Firozabad Phone 8250092165 Escorts Service At 6k To 30k Along With Ac Room
Vip Firozabad Phone 8250092165 Escorts Service At 6k To 30k Along With Ac Room
 
一比一原版(Curtin毕业证书)科廷大学毕业证原件一模一样
一比一原版(Curtin毕业证书)科廷大学毕业证原件一模一样一比一原版(Curtin毕业证书)科廷大学毕业证原件一模一样
一比一原版(Curtin毕业证书)科廷大学毕业证原件一模一样
 

Automate Yo'self -- SeaGL

  • 1. Automate Yo' Self! SeaGL 2016 Seattle, yo John SJ Anderson @genehack if anybody has any questions or i'm going too fast, please throw up a hand and ask -- or grab me on the hallway track
  • 2. Hi, I'm John. hi, i'm john
  • 3. @genehack i go by genehack most places on line. today i'm going to talk to you today about some tools and tricks i have for being productive while developing. but before i do that, i need to explain a bit about why i needed it. my life is busy.
  • 7. A Wife and a wife that i like to hang out with
  • 9. photobomber is not impressed. A Wife long-suffering conference widow
  • 11. Hobbies and i have a few hobbies -- maintain some Perl modules,
  • 12. Hobbies Trying to learn Swift, check out Angular 2,
  • 14. I've got a lot of balls in the air don't have time for trivial nonsense, so i use a lot of automation and other "lifehacks"
  • 15. AUTOMATE YO' SELF occasionally, you just have to automate yo' self!
  • 16. Basic Principles whenever i'm trying to do this, there are some basic principles that i try to keep in mind
  • 17. Don't Make Me Think none of this automation stuff should require me to think -- if i have to think about it, it's not really saving me any time
  • 18. This is my "you made me think" face. the whole point is not having to think.
  • 19. Consistency is Good. so, in those terms, one thing that's essential: make everything the same. have a standard directory layout under $HOME. you shouldn't have to think about what system you're on, what shell, what project. things should just be the same -- or at least *correct* -- all the time
  • 20. Idempotence is better! Idempotence: the property of certain operations in mathematics and computer science, that can be applied multiple times without changing the result beyond the initial application
  • 21. App::MiseEnPlace so, here's an example of idempotence, a utility i wrote to manage symlinks and directories in my home directory
  • 22. App::MiseEnPlace "everything in its place" "mise en place" is a French phrase meaning "everythng in its place" -- it comes from cooking, and the principle that you should have all your ingredients prepped and ready to go before you start cooking. i wanted something to make sure i always had my standard directory layout under $HOME as well as setting up various symlinks
  • 23. % cat ~/.mise --- manage: - doc - etc - private - proj/* - src/* create: directories: - bin - proj - proj/go/src/github.com/genehack - src - var links: - Desktop: var/tmp - Desktop: tmp here's what the top level config for mise looks like -- it goes in .mise in your home directory. we have a list of directories we want to manage (more on that in a minute) and a set of directories and symlinks to create. links are source:target
  • 24. % cat proj/emacs/.mise --- create: links: - DIR: ~/.emacs.d - bin/build-most-recent-emacs: BIN - bin/e: BIN - bin/ec: BIN - bin/git-blame-from-line-num: BIN - bin/map-test-lib: BIN this is a per-project config file. mise has a couple special keywords DIR and BIN, that refer to the directory containing the .mise file and ~/bin, respectively the advantage of this is you don't need to have a huge gnarly $PATH with a bunch of project directories in it, everything is just symlinked into ~/bin
  • 25. % mise [LINK] created ~/proj/emacs -> ~/.emacs.d [LINK] created ~/proj/emacs/bin/build-most-recent-emacs -> ~/bin/build-most-recent-emacs [LINK] created ~/proj/emacs/bin/e -> ~/bin/e [LINK] created ~/proj/emacs/bin/ec -> ~/bin/ec [LINK] created ~/proj/emacs/bin/git-blame-from-line-num -> ~/bin/git-blame-from-line-num [LINK] created ~/proj/emacs/bin/map-test-lib -> ~/bin/map-test-lib % mise % rm ~/bin/e % mise [LINK] created ~/proj/emacs/bin/e -> ~/bin/e when we run mise for the first time, you can see it creates all those links. if we run it again, it does NOTHING. Idempotency for the win! If you remove a link and run it again, it creates _just_ that link
  • 26. App::MiseEnPlace get it from your favorite CPAN mirror available on CPAN, minimal dependencies, works on any perl from this decade.
  • 27. smartcd ok, so that handles getting a consistent directory structure, and linking project binaries. what if you have other per-project stuff that you want to set up? environment variables or other stuff?
  • 28. smartcd Automatically run code when entering or leaving directories or sub-directories enter smartcd, which hooks the 'cd' command and then runs scripts when you enter or leave a directory (or even a subdirectory)
  • 29. % smartcd show enter /Users/genehack/.smartcd/scripts/Users/genehack/fake-node-proj/bash_enter exists ------------------------------------------------------------------------- ######################################################################## # smartcd enter - /Users/genehack/fake-node-proj # # This is a smartcd script. Commands you type will be run when you # enter this directory. The string __PATH__ will be replaced with # the current path. Some examples are editing your $PATH or creating # a temporary alias: # # autostash PATH=__PATH__/bin:$PATH # autostash alias restart="service stop; sleep 1; service start" # # See http://smartcd.org for more ideas about what can be put here ######################################################################## autostash NODE=4.2.3 autostash PATH=$PATH:__PATH__/node_modules/.bin/ nvm use $NODE ------------------------------------------------------------------------- smartcd has 'edit' and 'show' subcmds (and a bunch of others), and 'leave' and 'enter' scripts. here's an enter script for an arbitrary node project. the autostash keyword sets up an environment variable that will be *unset* when you leave this directory. you can also run arbitrary commands; the 'nvm' command here selects a version of node to use
  • 30. % smartcd show enter /Users/genehack/.smartcd/scripts/Users/genehack/fake-node-proj/bash_enter exists ------------------------------------------------------------------------- ######################################################################## # smartcd enter - /Users/genehack/fake-node-proj # # This is a smartcd script. Commands you type will be run when you # enter this directory. The string __PATH__ will be replaced with # the current path. Some examples are editing your $PATH or creating # a temporary alias: # # autostash PATH=__PATH__/bin:$PATH # autostash alias restart="service stop; sleep 1; service start" # # See http://smartcd.org for more ideas about what can be put here ######################################################################## autostash NODE=4.2.3 autostash PATH=$PATH:__PATH__/node_modules/.bin/ nvm use $NODE ------------------------------------------------------------------------- smartcd has 'edit' and 'show' subcmds (and a bunch of others), and 'leave' and 'enter' scripts. here's an enter script for an arbitrary node project. the autostash keyword sets up an environment variable that will be *unset* when you leave this directory. you can also run arbitrary commands; the 'nvm' command here selects a version of node to use
  • 31. % smartcd show enter /Users/genehack/.smartcd/scripts/Users/genehack/fake-node-proj/bash_enter exists ------------------------------------------------------------------------- ######################################################################## # smartcd enter - /Users/genehack/fake-node-proj # # This is a smartcd script. Commands you type will be run when you # enter this directory. The string __PATH__ will be replaced with # the current path. Some examples are editing your $PATH or creating # a temporary alias: # # autostash PATH=__PATH__/bin:$PATH # autostash alias restart="service stop; sleep 1; service start" # # See http://smartcd.org for more ideas about what can be put here ######################################################################## autostash NODE=4.2.3 autostash PATH=$PATH:__PATH__/node_modules/.bin/ nvm use $NODE ------------------------------------------------------------------------- smartcd has 'edit' and 'show' subcmds (and a bunch of others), and 'leave' and 'enter' scripts. here's an enter script for an arbitrary node project. the autostash keyword sets up an environment variable that will be *unset* when you leave this directory. you can also run arbitrary commands; the 'nvm' command here selects a version of node to use
  • 32. % cd ~/fake-node-proc Now using node v4.2.3 (npm v2.14.7) % echo xx$NODE xx4.2.3 % cd .. % echo xx$NODE xx here's what it looks like when you cd into that directory. and you can see the env var is set. if we change back out of the directory, the environment variable is unset.
  • 33. smartcd https://github.com/cxreg/smartcd pretty cool, available on github. works with bash and zsh. really easy to install. i can pay this the highest possible compliment: i haven't forked it or needed to patch it in any way, i just use a checkout from the upstream repo
  • 34. another option: direnv http://direnv.net/ https://github.com/direnv/direnv another way to do this is called direnv written in go, hooks into shells in a similar way big difference: config stored _inside_ project directory
  • 35. $ cd ~/my_project $ echo ${FOO-nope} nope $ echo export FOO=foo > .envrc .envrc is not allowed $ direnv allow . direnv: reloading direnv: loading .envrc direnv export: +FOO $ echo ${FOO-nope} foo $ cd .. direnv: unloading direnv export: ~FOO $ echo ${FOO-nope} nope direnv supports similar directory-specific env vars
  • 36. $ cd ~/my_project $ echo ${FOO-nope} nope $ echo export FOO=foo > .envrc .envrc is not allowed $ direnv allow . direnv: reloading direnv: loading .envrc direnv export: +FOO $ echo ${FOO-nope} foo $ cd .. direnv: unloading direnv export: ~FOo $ echo ${FOO-nope} nope direnv supports similar directory-specific env vars
  • 37. $ cd ~/my_project $ echo ${FOO-nope} nope $ echo export FOO=foo > .envrc .envrc is not allowed $ direnv allow . direnv: reloading direnv: loading .envrc direnv export: +FOO $ echo ${FOO-nope} foo $ cd .. direnv: unloading direnv export: ~FOO $ echo ${FOO-nope} nope direnv supports similar directory-specific env vars
  • 38. direnv may be better for collaborative projects.
  • 39. direnv may be better for collaborative projects?
  • 41. App/Env Builders are your friends speaking of per-project settings, let's talk for a minute about application builders.
  • 42. perlbrew plenv rubyenv nvm App::GitGitr build-most- recent-emacs here are some of the ones i've used or use now. perlbrew and plenv let you have multiple perls. nvm does the same thing for node. similar tools exist for python, ruby, etc. then there's GitGitr, which I wrote while maintaining Git wrapper library. I needed to be able to quickly install arbitrary Git versions while responding to bug reports -- so I wrote a little tool that does that. Similarly, I'm an Emacs user. If a new version is released, I want to upgrade, across all my systems - so I scripted that.
  • 43. Consistency Corollary: Don't trust system binaries Back at the beginning, I said "consistency is good". Now, if you're developing on MacOS and deploying to Linux (or dev-ing on Ubuntu and deploying to Debian), you're probably not going to have the same version of tool from the OS (and if you do now, it's not going to last). Even if the versions are the same, there may have been vendor patches applied.
  • 44. Automate building your critical tools. No, if you really want to be consistent, the best approach is to build the tools that are most critical for your project. ("Build" in this case may just mean automating the install; it doesn't have to mean "build from source".) Note: only do this for the *important* stuff. (include examples)
  • 45. The Silver Searcher Speaking of tools, here's a tool that has literally improved my entire development life -- the silver searcher. Anybody here using this?
  • 46. grep? ok, so, grep -- everybody knows grep, right? let's you search for text inside files, which is something you do a lot while developing code.
  • 47. powerful, speedy, indiscriminate so, grep is super powerful in terms of what you can search for, and it's pretty quick, but it's not very selective. you can list all the files you want to search, or search whole dir trees, but you quickly realize this sucks, because of things like .git directories. anybody ever do a recursive grep on a big git checkout? yeah.
  • 48. ack? anybody here use ack? ack is a grep-like tool written in perl.
  • 49. powerful, selective, slow it's just as powerful as grep in terms of what you can search for, but it's recursive by default (which is what you want) and it's smart about ignoring .git and SVN stuff. the problem is, it's pretty slow, particularly to start up (because Perl)
  • 50. ag! enter ag (which is what the binary for the silver searcher is called.
  • 51. powerful, selective, FAST ag works much like ack (not _exactly_, but close enough), but it's written in C and it's oh so fast.
  • 52. The Silver Searcher https://github.com/ggreer/the_silver_searcher available on Github, also packaged in several Linux distros. again, no higher compliment than to say I just build from a checkout of the upstream. have never needed to fork or patch
  • 53. retraining your forearms for fun & profit karabiner, setting up keyboard driver to force correct shift key usage
  • 54. My biggest productivity/automation tip so, here's my single biggest tip in this whole talk. are you ready? brace yourselves.
  • 55. revision control $HOME this is it. anybody know what this is? this is your home directory under revision control
  • 56. Why bother? no, but seriously. it's a little bit of a pain to develop the discipline but once you get used to having _everything_ under revision control, it's nice. you don't have to worry about experimenting with anything, backing stuff up, or dealing with cross-machine variation in your environments
  • 57. say automation again originally i had series of kludgy shell scripts to manage repo updates and checkouts super ugly and not worth sharing and then, inspiration: Ingy döt Net talking about App::AYCABTU @ PPW2010
  • 58. Ingy döt Net this is ingy - he's a crazy awesome open source hacker guy who has done a whole bunch of stuff. probably best known for being one of the inventors of YAML
  • 59. Things I wanted to steal the thing ingy had developed had a bunch of stuff i wanted to steal: The basic idea The interface Info about repositories in config file Flexible ways of selecting repos for operations – by #, by name, by tag
  • 60. Things I wanted to add Support for more than just Git Locate repositories in arbitrary locations Easily add and remove repositories Ability to easily extend with more subcommands Most importantly: better name!
  • 61. App::AYCABTU?!?!‽ and finally, the name. what even is this.
  • 62. GitGot Thus was born GitGot http://search.cpan.org/dist/App-GitGot/ Installs a ‘got’ command Uses Moo and App::Cmd under the covers Add new subcommands by writing a single class!
  • 63. Whirlwind Tour Let's take a whirlwind tour of how got works
  • 64. got add you tell got about repos using the 'add' command, from inside the git repo
  • 65. % got add Name: foo URL: Path: /Users/genehack/foo Tags: bar it'll prompt you for required info, and supply sensible defaults. note that you can also apply tags (space-delimited)
  • 66. got add -D or you can just add the '-D' switch and it'll automatically use the defaults
  • 67. got clone <REPO URL> you can also clone a remote repo, which will check it out into the working directory and add it to got, prompting you for details
  • 68. % got clone git@github.com:genehack/app-gitgot.git Name: [app-gitgot]: Path: [/Users/genehack/app-gitgot]: Tags: Cloning into '/Users/genehack/app-gitgot'... it'll prompt you for required info, and supply sensible defaults. note that you can also apply tags (space-delimited)
  • 69. got clone -D <REPO URL> got clone also respects the '-D' switch
  • 70. got fork <GITHUB URL> finally, you can give got a github url, and it will fork that project under your github id, then check it out into the current directory and add it to got
  • 71. ~/.gitgot all the info about the repos managed by got lives in this .gitgot file in your home directory
  • 72. - name: App-Amylase path: /Users/genehack/proj/App-Amylase repo: git@github.com:genehack/App-Amylase.git type: git - name: Git-Wrapper path: /Users/genehack/proj/Git-Wrapper repo: git@github.com:genehack/Git-Wrapper.git tags: git type: git - name: HiD path: /Users/genehack/proj/HiD repo: git@github.com:genehack/HiD.git type: git - name: Perl-Build path: /opt/plenv/plugins/perl-build repo: git://github.com/tokuhirom/Perl-Build.git type: git it's just a simple YAML formatted line, totally hand-editable (although you shouldn't _need_ to do that, you can) note that repos can be located anywhere on the disk, don't have to under a common dir or in your home or whatever. anywhere you can write to is fair game
  • 73. But now what? ok, so you've added all your git repositories to got. what now?
  • 74. got list well, you can get a list of them
  • 75. got ls which you can shorten to this
  • 76. 1) App-Amylase git git@github.com:genehack/App-Amylase.git 2) Git-Wrapper git git@github.com:genehack/Git-Wrapper.git 3) HiD git git@github.com:genehack/HiD.git 4) Perl-Build git git://github.com/tokuhirom/Perl-Build.git 5) Perl-Critic git git@github.com:genehack/Perl-Critic.git 6) STAMPS git git@github.com:genehack/STAMPS.git 7) advanced-moose-class git ssh://git@git.iinteractive.com/train/advanced-moose-class.git 8) app-gitgitr git git@github.com:genehack/app-gitgitr.git 9) app-gitgot git git@github.com:genehack/app-gitgot.git that'll get you this sort of listing.
  • 77. got ls -q if you don't want to see the upstream repo info, you can use the '-q' or '--quiet' switch
  • 78. 1) App-Amylase 2) Git-Wrapper 3) HiD 4) Perl-Build 5) Perl-Critic 6) STAMPS 7) advanced-moose-class 8) app-gitgitr 9) app-gitgot and that'll get you this output. note the numbers - those will give you a way to select repos for other commands
  • 79. got ls [repos] easiest way to demo that is with an example. you can restrict the listing
  • 80. got ls 5 this will just list repo #5 for example
  • 81. 5) Perl-Critic also, note that the list is always sorted the same way, so the numbers will be stable (unless you add new repos)
  • 82. got ls 5-8 you can also give a range of repos
  • 83. 5) Perl-Critic 6) STAMPS 7) advanced-moose-class 8) app-gitgitr and that'll give you that range, like you would expect
  • 84. got ls HiD you can also specify repos by name
  • 86. got ls -t git or by using tags. can specify multiple tags with multiple '-t' switches. they combine with 'or' semantics.
  • 87. 2) Git-Wrapper 8) app-gitgitr 9) app-gitgot here are all the repos tagged with 'git' (at least in our example)
  • 88. got ls 5-8 HiD 21 -t git finally, you can combine all of these selection methods together. here we're asking for repos 5 thru 8, the repo named HiD, repo 21, and all repos tagged with git
  • 89. 2) Git-Wrapper 3) HiD 5) Perl-Critic 6) STAMPS 7) advanced-moose-class 8) app-gitgitr 9) app-gitgot 21) etc and this is what we get note that most commands operate on all repos, and any that do, you can use these techniques to restrict the command to a subset.
  • 90. What else you got? That's cool.
  • 92. got status you can check the status of your repos. *all* your repos
  • 93. got st or if you're into the whole brevity thing...
  • 94. 1) App-Amylase : OK 2) Git-Wrapper : OK 3) HiD : OK 4) Perl-Build : OK 5) Perl-Critic : OK 6) STAMPS : OK 7) advanced-moose-class : OK 8) app-gitgitr : OK 9) app-gitgot : OK that'll get you output like this. again, note the use of color to give quick visual cues
  • 95. 1) App-Amylase : OK 2) Git-Wrapper : OK 3) HiD : Dirty 4) Perl-Build : OK 5) Perl-Critic : OK 6) STAMPS : OK 7) advanced-moose-class : OK 8) app-gitgitr : OK 9) app-gitgot : OK Dirty got status will let you know if a repo has uncommitted changes. super handy if, for example, working on one machine and are going to move to another one and want to see what hasn't been committed.
  • 96. 1) App-Amylase : OK 2) Git-Wrapper : OK 3) HiD : OK 4) Perl-Build : OK 5) Perl-Critic : OK 6) STAMPS : OK Ahead by 1 7) advanced-moose-class : OK 8) app-gitgitr : OK 9) app-gitgot : OK 1) App-Amylase : OK 2) Git-Wrapper : OK 3) HiD : OK 4) Perl-Build : Dirty 5) Perl-Critic : OK 6) STAMPS : OK 7) advanced-moose-class : OK 8) app-gitgitr : OK 9) app-gitgot : OK Dirty 1) App-Amylase : OK 2) Git-Wrapper : OK 3) HiD : OK 4) Perl-Build : OK 5) Perl-Critic : OK 6) STAMPS : OK Ahead by 1 7) advanced-moose-class : OK 8) app-gitgitr : OK 9) app-gitgot : OK Ahead by 1 it'll also tell you if you have local commits that haven't been pushed to the remote yet
  • 97. got st -q finally, you can use the '-q' switch to hide the "uninteresting" stuff
  • 98. got st -q 3) HiD : Dirty 6) STAMPS : OK Ahead by 1 Dirty Ahead by 1 which in this case is all the repos that don't have changes and are up to date
  • 99. got update you can also run 'git pull' across all your repos
  • 100. got up which abbreviates to 'up' and yeah, i should have called it pull but i'm a dummy and we're stuck with it now.
  • 101. 1) App-Amylase : Up to date 2) Git-Wrapper : Up to date 3) HiD : Up to date 4) Perl-Build : Updated Updating 7f25f89..72587c8 Fast-forward lib/Perl/Build.pm | 14 +++++++++++++- script/perl-build | 14 +++++++++++++- 2 files changed, 26 insertions(+), 2 deletions(-) 5) Perl-Critic : Up to date Updated it'll do pretty much what you expect (and it supports '-q' too)
  • 102. got update_status finally, there's a command that combines both those, because it's something i do pretty frequent -- update everything, then look at the status of everything
  • 103. got upst surprise - you can abbreviate that one too
  • 104. got upst -q and it also supports the '--quiet' option to only show you the interesting stuff
  • 105. How much would you pay? so, how much would you pay?
  • 107. got fetch if you're not a fan of the way 'git pull' works you can also run 'git fetch' via got.
  • 108. got push you can even do a push across all your repos at once. (personally, this strikes me as insane but somebody sent in a patch, so...)
  • 109. got gc you can garbage collect all your repos
  • 110. got this at some point, somebody sent in a patch to add 'got this' -- which tells you if the current directory is under got control
  • 111. % cd proj/HiD % got this 4) HiD
  • 112. got that <DIRECTORY> this provoked somebody else to send in a 'got that' command, which does the same thing, but takes a path to check
  • 113. % got that ~/etc 37) etc
  • 114. got chdir finally, there are a number of commands that help you jump to the directory of a project. got chdir
  • 115. got cd also spelled 'got cd', will change your current working directory to the given repo (note that this is one of the few got commands that requires a single repo)
  • 116. got tmux we also have tmux integration -- 'got tmux' will open a new tmux window with the working directory in your repo. this _can_ be done with multiple repos. better, the tux window is persistent; as long as it's open 'got tmux' will just select the already open window, not open a new one
  • 117. got tmux -s you can also spawn whole new tmux sessions if you prefer those to windows -- and again, those will be re-used as long as they're around
  • 120. Works on any perl from the last 5 years
  • 122. cpanm App::GitGot can be even simpler
  • 123. Find me at SeaGL and I'll help you install! or you can find me on the hallway track and i'll help you get it installed on your machine
  • 125. package App::GitGot::Command::chdir; # ABSTRACT: open a subshell in a selected project use 5.014; use App::GitGot -command; use Moo; extends 'App::GitGot::Command'; use namespace::autoclean; sub command_names { qw/ chdir cd / } sub _execute { my( $self, $opt, $args ) = @_; unless ( $self->active_repos and $self->active_repos == 1 ) { say STDERR 'ERROR: You need to select a single repo'; exit(1); } my( $repo ) = $self->active_repos; chdir $repo->path or say STDERR "ERROR: Failed to chdir to repo ($!)" and exit(1); exec $ENV{SHELL}; } 1;
  • 126. package App::GitGot::Command::chdir; # ABSTRACT: open a subshell in a selected project use Moo; extends 'App::GitGot::Command';
  • 127. sub command_names { qw/ chdir cd / }
  • 128. sub _execute { my( $self, $opt, $args ) = @_; unless ( $self->active_repos and $self->active_repos == 1 ) { say STDERR 'ERROR: You need to select a single repo'; exit(1); } my( $repo ) = $self->active_repos; chdir $repo->path or say STDERR "ERROR: Failed to chdir to repo ($!)" and exit(1); exec $ENV{SHELL}; }
  • 129. package App::GitGot::Command::chdir; # ABSTRACT: open a subshell in a selected project use 5.014; use App::GitGot -command; use Moo; extends 'App::GitGot::Command'; use namespace::autoclean; sub command_names { qw/ chdir cd / } sub _execute { my( $self, $opt, $args ) = @_; unless ( $self->active_repos and $self->active_repos == 1 ) { say STDERR 'ERROR: You need to select a single repo'; exit(1); } my( $repo ) = $self->active_repos; chdir $repo->path or say STDERR "ERROR: Failed to chdir to repo ($!)" and exit(1); exec $ENV{SHELL}; } 1;
  • 130. Suggestions welcome! areas for improvement: support for other VCSen better config management tools any other crazy workflow improvement you can think of!
  • 133. …but it is a great way to learn a new language You don't have to write a code…
  • 134. can also just be about making the wrong way harder
  • 135. Thanks SeaGL organizers Ingy döt Net Yanick Champoux Michael Greb Rolando Pereira Chris Prather photo credits: all photos by speaker except Ingy döt Net photo - https://www.flickr.com/photos/bulknews/389986053/ and pug - https://upload.wikimedia.org/wikipedia/commons/d/d7/Sad-pug.jpg and automate yo'self - somewhere on the net
  • 136. thanks to the company i work for for allowing me to (occasionally) mess with this stuff and sending me out to give these talks. holler at me on the hallway track if you're looking for some Open Source consulting or staff augmentation
  • 137. Questions? as i said, i *love* to talk to people about this productivity type stuff, so grab me on the hallway track. i'm friendly.