Things I found on GitHub: shell history
corte.si
corte.si
I suspect this is the case. I leave my emacs running for the entire work week. When I need to make a quick change and go back to the terminal I pop open vim.
(FWIW, I am an emacs user).
[1] From HN about a year ago - http://news.ycombinator.com/item?id=3717754
[2] Another random poll I found searching HN - http://gopollgo.com/which-editor-do-you-prefer-emacs-or-vi
[3] Slashdot poll from 2009, the earliest/only one I can actually find right now - http://slashdot.org/pollBooth.pl?qid=1717&aid=-1
yum install emacs-nox
I worked for over 5 years as remote DBA/sysadmin and I must have installed emacs on hundreds of customer boxen. It never once was an issue.By the time you solved all dependency with yum I finished editing the file with vi already.
I also don't close Emacs often so I don't need to invoke it frequently...
(require 'server)
(server-start)
Then some shell aliases for instantaneous emacs from the shell: alias e="emacsclient --no-wait"
Now $ e myfile.c
in the shell will open the file instantaneously in the running emacs and the OS will switch window focus to emacs.I use this a lot; magit-status on the current repo:
$ cat ~/bin/egit
emacsclient --no-wait \
--eval "(magit-status \"$PWD\")" \
--eval "(progn (select-frame-set-input-focus (selected-frame)) (delete-other-windows))"I dunno. I've done that in the past (actually using a separate init), too. Zile just seems simpler and it works fine for me. There's a billion ways to do things, it is hard to justify idiosyncrasies.
I think what started it was that I drastically simplified my emacs init file (used to be several files, very smart and thought-out but massive and filled with rarely-used stuff) and I found myself always popping into nano for quick edits to system files. Well this quickly got annoying as there were conflicting key bindings with emacs and my muscle-memory was causing frequent errors. So I googled an emacs-flavored nano and settled on the first one I tried. Then I aliased nano to 'echo "USE ZILE"' until that became second nature, too.
cp <orig> <copy>
Hence I think of it as ln <orig> <link>
(edit: formatting) SYNOPSIS
ln [OPTION]... [-T] TARGET LINK_NAME (1st form)
He just replaced TARGET with 'orig'Hence the confusion, I guess.
(I don't think I've ever read the ln man page. I learned it by trying it both ways until I learned which way was correct.)
SYNOPSIS
ln [-fhns] source [target]
ln [-fs] source ... [directory]
Not to mention the detailed description as well as informative examples.I definitely refer to ln more than any other man page... Every time I use ln I say "target, link name" in my head.
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 ln -s /path/to/some/file
And it'll create a symlink called "file" in the current directory. That wouldn't be possible if the arguments were the other way around.I think this is because 'to copy' is a transitive verb and 'to link' is instransitive, in the sense they are used here...?
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.) $ unset HISTFILE
The manpage for bash has many hidden gems $ echo 'this is logged'
$ echo 'this is not logged'I'm sure there are ways to delete commits, but it is just so complicated.
Sounds like they have a unique definition of "simple".
Well, you can do that, but suddenly no one else who works with your repo will be able to pull changes, because there is no way to reconcile the histories. Think of them as divergent timelines. They're like, "last thing I saw, Obama got re-elected; what's happened since then?", and your modified repo is like, "Uh, I don't know who this 'Obama' fellow is, and don't let the Lizard King hear you talking about elections."
The advice is: "Messing with the history of replicated repos is a major undertaking and is not to be undertaken lightly." But I guess that doesn't roll of the tongue as well as "never".
| A free software should provide freedom to the user
| to do anything they wish.
There is freedom. It's the same freedom that allows the root user to `dd` over the master boot record on a Linux install. People tell you to shy away from it because you can shoot yourself in the foot, not because it's not possible.Look into git-filter-branch for wholesale rewriting of commits.
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.
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.
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
For example, on OSX I use MacVim with the mvim script to launch a new window. I use aquamacs with the eponymous command line tool as well
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...
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.
./ghrabber.py "path:.bash_history"
File "./ghrabber.py", line 3, in <module>
import BeautifulSoup
ImportError: No module named BeautifulSoupI 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?
pip install beautifulsoup
You might have to install pip with easy_installWhat I usually do, is I have a system python for packages managed with apt (There are a lot of these, try):
aptitude search '?and(?depends(python),?installed)'
- and a system installed virtualenv.I then have a local python virtulalenv for installing misc packages (eg: a more recent mercurial than the one distributed in apt on older Debian distros):
virtualenv ~/opt/python-misc
ln -s ~/opt/python-misc/bin ~/pybin
# In .bashrc:
if [ -d "~/opt/pybin" ] then PATH="~/opt/pybin:${PATH}" fi; export PATH
Note my "local" python virtualenv is before system in path, so any casual pip install "shiny-package-that-migh-break-system" just (at worst) means I have to recreate the virtualenv (or pip uninstall it).But for projects -- I highly recommend looking at buildout. A nice summary I stumbled across here:
http://www.marmelune.net/en/python/buildout/from-virtualenv-...
edit: formatting
Same functionality as bundle install, just pythonic.
Pythonistas will have to use something like pip-tools < https://github.com/nvie/pip-tools >, as far as I can tell.
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.
(See https://github.com/technicalpickles/homesick for an example of how to do it right.)
Searching for wp-config.php yields way too many results