
Things I found on GitHub: shell history - spindritf
http://corte.si/posts/hacks/github-shhistory/index.html
======
mtinkerhess
Together, vim and vi have over four times as many invocations as emacs. I like
to think it's beacuse vim is more popular, but it might also mean that vim
users are more likely to pop in and out of vim while emacs users run emacs
once and then never go back to bash-land.

~~~
thirsteh
It might also mean that vim users are more likely to check their ~/.* files
into a public Git repository. You really can't do that much with the
information that vim was invoked more.

~~~
nathan_long
I'm a near-rabid Vim user, but I also came here to point that out. You can't
draw conclusions about what people in general do from a sample of people who
check in their history files.

~~~
chacha102
The sample size of this experiment is also not very large. If you look at the
axis on the graphs, we're not talking in numbers that would let you to create
solid generalizations.

------
icambron
I suspect ln is at the top of the man list because no one can ever remember
what order the arguments go in.

~~~
pyre

      ln -s target link
    

Easiest way to remember is that it's setup so that you can create multiple
links to the same target. E.g.:

    
    
      ln -s /home/.bashrc {~user1,~user2,~user3}/.bashrc

~~~
dsl
This is bash specific and may not work in your shell. (fish for example)

~~~
pyre
Sorry, the {} part was just so that the line wasn't too long (causing the
scrollbar to show up).

------
IgorPartola
Tip of the day: you can prevent embarrassing commits by using a global
gitignore file: <https://help.github.com/articles/ignoring-files>

~~~
DaveInTucson
If you also find little or no use for .bash_history, you can do this:

    
    
      rm ~/.bash_history
      ln -s ~/.bash_history /dev/null
    

(There's probably some .bashrc setting that turns off history, but I'm making
it a goal in my life to know as little about bash configuration as I possibly
can.)

~~~
niggler

        $ unset HISTFILE
    

The manpage for bash has many hidden gems

------
Datsundere
Github is amazing. But I don't like how it's exceptionally hard to delete
history of commits. I've looked around for a long time to delete commits
safely and people say things like "you shouldn't be doing it anyway." A free
software should provide freedom to the user to do anything they wish. I fee
like I'm chained down when I want to delete very old commits.

I'm sure there are ways to delete commits, but it is just so complicated.

~~~
rickyc091
Github recently published this after the whole search debacle. You can use it
to prune all existence of a file form your history.

<https://help.github.com/articles/remove-sensitive-data>

~~~
joshfraser
"Fortunately, git makes it fairly simple to remove the file from the entire
repo history."

Sounds like they have a unique definition of "simple".

------
wamatt
Interesting stats. I'd be wary however, of prematurely drawing any hard
conclusions.

For example comparing vim to emacs, one should rather look at whether the bash
history indicates a _predominantly_ emacs or vim user, then _isolate_ or
compartmentalize that as a single vote.

Even then we can't be sure that it supports any grandiose claim, but it should
in theory be a little more accurate.

~~~
andrewvc
Agreed, also, for Vim vs. Emacs, most users of both probably use the GUI
variants at this point, which leave no shell history. I still run emacs on
remote terms, but then I don't make the mistake of uploading my bash history
into a git repo.

~~~
jpiasetz
Any reason you would think more people use the GUI version?

Although I obviously have a biases sample but everyone I know uses the shell
version of both. The people I know who use the GUI use other editors.

~~~
niggler
OS Integration -- copy-and-paste works better, scroll works predictably (there
are quirks in OSX terminal using mouse mode in vim and in emacs), sensical
full-screen mode

Advanced features -- Certain things can't be done with the terminal. For
example, Aquamacs lets you see inline latex previews:
<http://aquamacs.org/latex.shtml>

------
Ologn
On my Ubuntu, pico is a link to nano, and I usually type nano when I want to
use it. I wonder what the editor results would show with nano thrown in.

I'm surprised so many people use apt-get instead of aptitude - the only time I
use apt-get is usually to install aptitude.

Also surprised people use find so much. I use locate probably 80% of the time,
find maybe 20% of the time or less. Operations like this are what caching was
made for.

I did not know tmux was a popular as it is. That's interesting. I am not
surprised sublime is gaining in popularity...

~~~
winter_blue
> I use locate probably 80% of the time, find maybe 20% of the time or less

Absolutely true. find is way too slow. I was hacking on some AOSP code
recently and _finding_ a file took upwards of 1 minute. locate on the other
indexes the files on your hard disk, so is generally much quicker.

------
tibbon
Rubyist here; how does one install the BeautifulSoup module here (Macbook Pro
with Mountain Lion)?

./ghrabber.py "path:.bash_history"

    
    
      File "./ghrabber.py", line 3, in <module>
    
        import BeautifulSoup
    

ImportError: No module named BeautifulSoup

I tried easy_install beautifulsoup but it gave a permissions error, so I ran
it as sudo and that worked, but when I re-run the script it still throws the
same error.

Does python lack 'bundle install'-like functionality?

~~~
kmfrk

        pip install beautifulsoup
    

You might have to install pip with easy_install

~~~
tibbon
Thanks! With Python, do you have to manually install each module and keep
track of the versions?

~~~
pplante
If you are using pip you can type "pip freeze" and it will spit out a list of
all modules and the version currently installed. Most write this out to a file
called "requirements.txt" in their project root. You can then use this list to
install modules via "pip install -r requirements.txt"

Same functionality as bundle install, just pythonic.

~~~
kmfrk
What s/he said. Although keeping track of new updates is a bit of a pain,
since there isn't a service like the one Rubyists have to get information
about new gem versions.

Pythonistas will have to use something like pip-tools <
<https://github.com/nvie/pip-tools> >, as far as I can tell.

~~~
e12e
Nice, I hadn't seen pip-tools before. There is also yolk (pip install yolk)
that will list available updates.

------
songgao
This might be a little off topic but I'm curious how could somebody
accidentally (or why would somebody intentionally) push .bash_history to
GitHub?

~~~
gojomo
There are some tasks I do infrequently enough I can't remember the paths,
commands, and options... but my history always saves me. So when I know it's
full of useful stuff, and especially when moving a bunch of
files/functionality to a new place, I tend to create a copy of my
.bash_history in another, non-hidden file.

Of course such renamed files wouldn't have been part of this analysis, so it
doesn't exactly explain why files exactly named .bash_history are in Github.
(For that, I'd surmise many people make an entire project-specific login
directory git-versioned.) But it does hint why someone might intentionally
want to remember their history in version control.

Done intentionally, it strikes me as a potentially valuable reproducibility,
auditing, and training practice – documenting what was done around the time of
other file evolution, making it easier for someone else to help out in a pinch
with full context.

------
cheeseprocedure
I'm surprised to see ssh-keygen being called more often than ps. Perhaps this
is skewed by history files being sourced from development boxes?

------
tibbon
As always, I'm saddened to find how many people put their passwords out there
in the plain...

Searching for wp-config.php yields way too many results

~~~
themgt
This is arguably the fault of Wordpress developers for creating a config
system which forces or at least encourages you to fork their code to set your
database location. This is why configuration shouldn't go in code, ala
12factor:

[1]: <http://www.12factor.net/>

------
tocomment
Is there any chance I could get a copy of your cleaned up data? I have an
analysis I'd love to try running.

------
eik3_de
"exit" is at position 5 in the list -> there seem to be many console users
that don't know CTRL-D

------
tuananh
This is why I push my .dotfiles to a private repo.

