Our Torvalds, who art in Finland
Hallowed be thy code
Thy kernel come
thou art half done
on AMD as it is in X86
And give us this release our bug fixes
And forgive us our half-assed bug reports
As we forgive those whose patches aren't fixes.
And insmod us not into kernel taint
But deliver us from Microsoft.
For mine is the license
And the source
Forever GPL'd
Ramen
from Reddit/Linux, composed by multiple authors
This blog is devoted to everything under the sun, minus the things that don't interest me, such as pop culture, pseudo-science, superstition, and other wastes of time. Attempting to group this blog under a neat little classification, like "science" or "politics", will prove to be an act of futility. You have been warned.
Showing posts with label linux. Show all posts
Showing posts with label linux. Show all posts
Friday, April 30, 2010
Friday, February 12, 2010
Spelling and Dictionary Lookups at Bash Command Line
If you've ever wanted an easy way to look up a word in the dictionary, or spell check a word at the command line (in Linux), I've come up with a simple way to do it.
First, make sure you have aspell and curl installed, then simply paste the following functions into your .bashrc file:
function dictlookup
{
function spellcheck
{
echo "$1" | aspell -a -c | grep "&"
}
Now you can do things like this:
> spellcheck antecedant
and:
> dictlookup antecedent
Enjoy!
First, make sure you have aspell and curl installed, then simply paste the following functions into your .bashrc file:
function dictlookup
{
curl dict://dict.org/d:$1
}function spellcheck
{
echo "$1" | aspell -a -c | grep "&"
}
Now you can do things like this:
> spellcheck antecedant
and:
> dictlookup antecedent
Enjoy!
Sunday, January 4, 2009
Characters
Ya know on Windows you can type ALT+236 to get an infinity sign? (and other special characters with other codes) In Linux, you can achieve the same thing by entering "unicode mode". To do this, type CTRL+SHIFT+U then type the Unicode code. So for instance, to get an infinity sign, the code is 221E. ∞ See, it works!
Cool, eh?
Cool, eh?
Saturday, November 22, 2008
Bash Tab Completion
For all you Linux users out there, I just discovered something wonderfully useful at the Bash command line: tab completion suggestions. See this pic to get a better idea what I'm talking about:

For the above example, I typed "to", then hit the "tab" key. As expected, my computer beeped, indicating "hey, dummy there are a bunch of matches, how am I supposed to figure out which one you want?". To get a list of the possible matches, hit the "tab" key again. Then it prints out all of the available choices. Why hadn't I discovered this sooner?
Oh, and if you think my custom cursor is nifty, here's the line of code to put in your ~/.bashrc file:
PS1='\n================================\n\[\033[01;32m\]\h\[\033[00m\]:\n \[\033[01;34m\]\w\[\033[00m\]\n > '
I like having a nice separation between command outputs. It also gives me a double-clickable path (for quick copying), I never have to type "pwd" to remind myself where I am, and can quickly see which machine I'm logged into. Uber handy.

For the above example, I typed "to", then hit the "tab" key. As expected, my computer beeped, indicating "hey, dummy there are a bunch of matches, how am I supposed to figure out which one you want?". To get a list of the possible matches, hit the "tab" key again. Then it prints out all of the available choices. Why hadn't I discovered this sooner?
Oh, and if you think my custom cursor is nifty, here's the line of code to put in your ~/.bashrc file:
PS1='\n================================\n\[\033[01;32m\]\h\[\033[00m\]:\n \[\033[01;34m\]\w\[\033[00m\]\n > '
I like having a nice separation between command outputs. It also gives me a double-clickable path (for quick copying), I never have to type "pwd" to remind myself where I am, and can quickly see which machine I'm logged into. Uber handy.
Tuesday, September 2, 2008
Slow SSH
Is SSH being slow? Are you running Ubuntu (8.04 at the time of this writing)? I've found the following solution fixes slow SSH and Telnet logins. Specifically, the symptom is an annoying ~10 second delay between attempting to log into a remote terminal, and when it prompts you for a password. If this is happening to you, do the following (to the remote machine):
sudo nano /etc/hosts
Then, just add a line with the IP address and host name of the machine you are logging in from. Apparently, the remote machine is trying to do a DNS lookup, or something, and timing out. If it already has your machine in its list of hosts, you can get in instantly. I've found a few other folks discussing this in the forums, but none of their suggestions worked for me.
Happy computing.
sudo nano /etc/hosts
Then, just add a line with the IP address and host name of the machine you are logging in from. Apparently, the remote machine is trying to do a DNS lookup, or something, and timing out. If it already has your machine in its list of hosts, you can get in instantly. I've found a few other folks discussing this in the forums, but none of their suggestions worked for me.
Happy computing.
Subscribe to:
Posts (Atom)