Check These Out
Query Wikipedia by issuing a DNS query for a TXT record. The TXT record will also include a short URL to the complete corresponding Wikipedia entry.You can also write a little shell script like:
$ $ cat wikisole.sh
$ #!/bin/sh
$ dig +short txt ${1}.wp.dg.cx
and run it like
$ ./wikisole.sh unix
were your first option ($1) will be used as search term.
Each shell function has its own summary line, as a comment. If there are multiple shell functions with the same name, the function with the highest number of votes is put into the file.
Note: added 'grep -v' to the end of the pipeline, to eliminate extraneous lines containing only '--'. Thanks to matthewbauer for pointing this out.
echo "Hello world!" | sprunge # Redirect a stream to a pastebin
sprunge ~/.bashrc # Send a file to a pastebin
Intended for dynamic ip OpenDNS users, this command will update your OpenDNS network IP.
For getting your IP, you can use one of the many one-liners here on commandlinefu.
Example:
I use this in a script which is run by kppp after it has successfully connected to my ISP:
---
#!/bin/bash
IP="`curl -s http://checkip.dyndns.org/ | grep -o '[[:digit:].]\+'`"
PW="hex-obfuscated-pw-here"
if [ "$IP" == "" ] ; then echo 'Not online.' ; exit 1
else
wget -q --user=topsecret --password="`echo $PW | xxd -ps -r`" 'https://updates.opendns.com/nic/update?hostname=myhostname&myip='"$IP" -O -
/etc/init.d/ntp-client restart &
fi
---
PS: DynDNS should use a similar method, if you know the URL, please post a comment. (Something with members.dyndns.org, if I recall correctly)
look at /boot/grub/menu.lst for somethig like:
## additional options to use with the default boot option, but not with the
## alternatives
## e.g. defoptions=vga=791 resume=/dev/hda5
## defoptions=vga=795
# defoptions=vga=873
## altoption boot targets option
## multiple altoptions lines are allowed
## e.g. altoptions=(extra menu suffix) extra boot options
## altoptions=(recovery) single
# altoptions=(verbose mode) vga=775 debug
# altoptions=(console mode) vga=ask
# altoptions=(graphic mode) quiet splash
# altoptions=(recovery mode) single
vga=(decimal value) is framebuffer mode
Uses logger in a while loop to log memory statistics frequently into the local syslog server.
Converts control codes and spaces (ASCII code ≤ 32) to visible Unicode Control Pictures, U+2400 ? U+2420. Skips \n characters, which is probably a good thing.
Manages everything through one sed script instead of pipes of greps and awks. Quoting of shell variables is generally easier within a sed script.