404 karma · joined January 15, 2013
I realized/remembered while reading the other comments that knowing what's available is a necessary part of "just use the command line a lot."
So try this, to get a good list of what's available (and for more command line composition)
$ man -k $(ls -1 /usr/bin |egrep -v "\[") 2>&1 |egrep -v "nothing appropriate"
See if you can figure out what 2>&1 does (it's a very common idiom, probably easy to find), and figure out why it's needed here.That's a long list of stuff, look at it a page at a time:
$ man -k $(ls -1 /usr/bin |egrep -v "\[") 2>&1 |egrep -v "nothing appropriate" |less
That's still a lot of stuff, save it off in a file in your home directory for later: $ man -k $(ls -1 /usr/bin |egrep -v "\[") 2>&1 |egrep -v "nothing appropriate" > ~/wholelottacommands.txtI really like this book, even today: http://shop.oreilly.com/product/9780596003302.do
The key to being proficient at the command line (as distinct from writing shell scripts) is to think of it as composition.
For example, run this:
$ file $(which $(man -k python | cut --delimiter " " --fields 1))
(The first '$' is your command line prompt, yours may differ; you don't type that. The other '$' characters you do type.)Now run each command from the inside out, starting with the man command. See what each command does. Build it up bit by bit, that's exactly what I did, like this:
- the man command
- the man command piped into the cut command
- the man command piped into the cut command after reading "man cut" to remember about the --delimiter option
- the output of that pipeline fed to which
- the output of which fed to file
Note that I didn't use any for loops or variables, the shell did the right thing for me.
Read the man pages for each of those commands.
set -o vi or set -o emacs (or their equivalent in .inputrc) helps a lot when you compose things incrementally. esc-k k k (etc) is your friend if you set -o vi.
Read man bash. It will take you a long time. For today, read the section on READLINE. While in man bash, search for the word READLINE at the front of the line, like this:
/^READLINE
Slash = search
^ = anchor the search to the front of the line
READLINE = what you're searching for in the current man page.
For now, all you need in your ~/.inputrc file is:
set editing-mode vi
This will give you vi command line editing in bash, as well as any other program that uses readline, like the python REPL.
For more info on .inputrc,
$ man readline
which is documentation for the C interface to readline, but is mostly about how readline is used by a user. For example, in man readline/VI Mode bindings
gives you all your command line editing commands when you use vi mode.
Get a mostly table of contents of man bash, for your searching pleasure:
$ man -P cat bash |egrep -v "^ " |egrep -o "^[^ ]+"
Sort it: $ man -P cat bash |egrep -v "^ " |egrep -o "^[^ ]+" |sortIn addition to LPTHW and dbond's very complete suggestions:
$ sudo apt-get install python-doc
This is not installed by default. It will install the entire python.org documentation site, probably at /usr/share/doc/python/html/index.html
Decide whether you want to use python2 or python3. Python 2.7 is probably what's installed by default on your linux distro (unless you use Arch). The following is not in the installed docs, it's an external site:
http://wiki.python.org/moin/Python2orPython3
Read PEP 8
http://www.python.org/dev/peps/pep-0008/
$ aptitude search python |grep framework
Pick a lightweight framework or two to install before you leave (unless you've packaged up the repository as dbond suggests). bottle, flask and pyramid come to mind. When in doubt, install it. Don't start off using a framework though, learn the basics of plain html, then css, then javascript, then a lightweight framework (or the framework first then javascript).
$ sudo apt-get install sqlite3
Install a database. sqlite is lightweight and more than good enough for learning, and won't bog you down with learning how to run a database server. Alligators and swamps ...
I wouldn't bother installing a web server, python comes with a rudimentary web server module.
General background on python web programming: (skim it)
file:///usr/share/doc/python/html/howto/webservers.html
The module you'll likely use to play around:
file:///usr/share/doc/python/html/library/simplehttpserver.html
Learn the python debugger, it's rudimentary but very helpful when you're learning.
file:///usr/share/doc/python2.7/html/library/pdb.html
Learn the python REPL, or the interpreter as they call it in the docs.
file:///usr/share/doc/python2.7/html/tutorial/interpreter.html
Install, learn and use a better python REPL:
sudo apt-get install ipython
If you can afford it, Oreilly has some good ebooks.
http://search.oreilly.com/?q=html
http://search.oreilly.com/?q=css
http://search.oreilly.com/?q=javascript
http://shop.oreilly.com/product/9780596805531.do
http://shop.oreilly.com/product/9780596517748.do
If you can't afford it, but you can afford the weight, search for books you like on AbeBooks: (used or internation edition books)
Dive Into Python is available online and downloadable: http://www.diveintopython.net/
Eventually you'll want to know more about sql: http://news.ycombinator.com/item?id=5087439
Learn you a shell:
http://tldp.org/HOWTO/Bash-Prog-Intro-HOWTO.html
http://www.tldp.org/LDP/abs/html/
Install vim and emacs and decide which one you like, but any simple arrow-key-based editor that comes with your desktop is good enough to get started.
Install git, eventually you'll lose some work and you'll see the light. Just go real basic with git if you haven't done much source control before. Don't get bogged down in learning git, you want to learn python and web programming. As you go, you'll eventually want to know more; you'll know when that is.
$ sudo apt-get install git
Appropriate first web projects would be any of the example projects that come with the lightweight framework docs.
Appropriate first python-specific projects would be the same, in whatever python tutorials you like.
Appropriate next projects would be whatever catches your interest as you're going through all of the above. Keep a notebook/file of project ideas. Actually that would be a nice first project right there, a simple web app for a project notebook.
EDIT: Also, learn to rely on the man pages.
$ man man
$ man bash
$ man python
$ man -k python
$ man woman
No manual entry for woman
After making my comment, I made a short search, and posted this: Sex, Lies and Mission Statements. http://news.ycombinator.com/item?id=5352298
It's from 1997. Things may have improved, I don't follow HR research. But it's at least a description of how things can go wrong, and probably still do.
Summary: Most managers report that their company's mission statement is ineffective, and many report that it's counter productive. Employee involvement in creating the mission statement is correlated with positive influence on behavior, yet that involvement is rare. Free coffee cups for everyone!
I do site admin with key based ssh/scp and nothing else. The key has a passphrase, and my Ubuntu desktop manages the passphrase nicely.
I don't like that I tried to leverage django's out of the box admin module too heavily; I should have written (or reused?) a small app for site management.
I'll be moving to a lightweight python framework, like bottle or flask, for the next incarnation. The framework will manage creation of static content (posts and comments) and everything will be served as static as much as possible.
Downloads: http://www.linuxmint.com/oldreleases.php
Everything there is an ubuntu derivative, except in the middle there's a debian rolling release edition.
I suppose the mainstream ubuntu derivative will be great for stereotypical "mom's", as long as Ubuntu's eye doesn't turn in that direction.
For more hacker types that want some creature comforts, are the debian versions a good choice? I would expect/hope that some of the multimedia "just works" benefits would be in there. http://www.linuxmint.com/release.php?id=14
Or would I be better off on debian/LXDE, and manage the few packages that I most care about on my own?
Now they're something else, and that's OK, but it's not what I want, and that's OK too.
At the moment I'm hanging on to the parts I want by my fingernails, running the nicely minimal Lubuntu. But I think the writing's on the wall that eventually Ubuntu/Canonical will have no interest in supporting the various Ubuntu derivatives, and I'll need to fall back to something like LXDE on Debian. And that's OK too.
Ubuntu used to be one thing. Now they're something else. That's OK. So long, and thanks for all the updates.
I don't know why a game publisher wouldn't want to sell new copies of old games forever, like you can do with movies in the good new days.
set editing-mode vi
(or set editing-mode emacs) because any application that uses readline gets to use those settings. So for example you get command line editing in various command line apps. bash uses readline, so you'll get that. The python repl will give command line editing with .inputrc set as above.
$ apt-rdepends -r libreadline6 |egrep -ve "^ " |wc -l
8995
psql (postgresql) and mysql (mysql) are really handy with command line editing."'ctrl-x ctrl-e' opens an editor to work with long or complex command lines"
If you've set -o vi, or set editing-mode vi in .inputrc, then on a command line type:
esc-v
(Escape key to get out of insert mode, then the 'v' key) That will open a full vim session for editing your complex command line. :wq
exits vim and gives your command to bash to execute.> "Bait-and-switch is a form of fraud used in retail sales but also practiced in other contexts. First, customers are "baited" by merchants' advertising products or services at a low price; then customers discover the advertised goods are not available. Other products are "switched" for them; however, these items are often costlier." https://en.wikipedia.org/wiki/Bait_and_switch
Bait and switch means that you're promised or enticed with one specific thing, but that thing is not available and you're offered something different. The idea is that you wanted something, so fuck it just buy it and get it over with. And of course some people won't even notice the switch.
Free now pay later and the other schemes are not bait and switch. When you get there/sign up, you have the free version right now, exactly as advertised. And there is no attempt (usually) to hide the fact that free is only for N days, after which you'll need to sign up.
Similar for free/paid for reduced/enhanced. You're getting exactly what's being offered.
But then when I see the side by sides that have been posted here, even the things that have been taken down, I get a big "fuck off" stuck in my throat.
Similar is not copy. Unless you want the same environment for copyright that we have right now with software patents.
My own view of the linux desktop is just something to give me nicely presented terminals and a very wee bit of eye candy. I use Lubuntu for that. Some urxvt terminal windows, a nice basic graphical browser and imap client, I'm good to go. I don't care if I can watch a movie or not (I can), most of the sound I want plays and never stops working (can't play midi for some reason, meh).
The tool chain he talks about is right here.
I want minimal things on the desktop, and Linux does that, minimal things, really well. Especially with something like Lubuntu or vanilla LXDE, it's a really nice implementation of the screen or tmux idea.
How many old people are stuck in a job because of health insurance. There's a lot of old people.
I think similarly, people who are anti-gay don't seem to know a lot of gay people, despite the fact that N% of the population are gay.
But I initially assumed it to be ballsy phishing, a brazen attempt to capitalize on Evernote's current trouble. Why? BECAUSE IT HAS A FUCKING LINK TO THE SERVICE IN THE EMAIL! That's the very minimum definition of phishing. Sheesh!
I hovered over it, saw that it was to evernote, but hovers can be faked, and my intuition and experience told me that this smells like phishing no matter what. Sheesh.
Doxygen may or may not work, it probably doesn't understand whatever language iOS uses (objc?). Also I think there are better solutions than doxygen these days.
But if you look at Doxygen then you'll know the kind of thing you're looking for. Note that you do not have to have marked up your code in order for doxygen to produce documentation for you.
Also I think doxygen, and probably whatever is better these days, can produce intermediate output which you could then easily process and produce a mind map on your own, if that's what you really want.
Here endeth the lesson.
Why would you want those people coming in to the office?
Fire them.
Don't punish the responsible people. And if the managers don't know which ones those are, fire them and replace them with their underlings.
Using it effectively, and knowing the dark corners of scalpeling, is quite another thing. It would be easy to get into deep trouble with a scalpel.
But that would be a management decision by the same people who decided to get all their butts in chairs from 9 to 5. There are no out of band managers, they're stuck with who they have.
Unless someone fired those managers. But that would be the CEO, and there are no out of band CEOs, they're stuck with her.
Unless someone fired her, and I guess their board is good at that at least.