Looking for something? Grep for it
Saturday, January 13th, 2007 grep -i juice fridge
Returned one result
grep -i juice fridge
Returned one result
With Bash, you can simply remove duplications by typing:
sort file | uniq
With Perl, it’s more funny. I found those pieces of code in Code Snippets.
Simple ‘Uniq’ code
my @uniq = keys %{{ map { $_ => 1 } @list }};
Another one, more efficient
my %u = ();
@uniqed = grep {defined} map {
[…]
Thanks Kaiser for the pic …
A nice classical Geek song; the part I liked the most is “We haven’t had that tm_year since 1969″ instead of “we haven’t had that spirit here since nineteen sixty nine”, referring to the UNIX timestamp.
“Berkeley California”
(Sung to the tune “Hotel California” by the Eagles)
In a dark dim machine room
Cool A/C in my hair
|Warm […]
Microsoft Buys Google
Have a look at http://g00gl3.com, enter your license and use google.
I know this joke since more than 2 years, and I can’t stop laughing every time I see it.
Can not find Intelligence
Visit a non-existent link at word press plugins portal; for example
http://wp-plugins.net/zzz ; no, it’s not really as serious as it seems […]
A is for awk, which runs like a snail, and
B is for biff, which reads all your mail.
C is for cc, as hackers recall, while
D is for dd, the command that does all.
E is for emacs, which rebinds your keys, and
F is for fsck, which rebuilds your trees.
G is for grep, a clever detective, […]
Wakegen dropped me that C program that crashes your UNIX machine.
Be careful! It’s dangerous, use it at your own risk
#include <sys/types.h>
#include <unistd.h>
int main() {
pid_t p=fork();
main();
}
It consists of the following: Creating infinte child processus until the buffer gets overloaded; […]
Here are some interesting Vim macros you can put on your ~/.vimrc :
To make get an insensitive and “smart” search:
set ignorecase
set smartcase
C file template will be generated when you press F7 button:
map <F7> i#include <stdio.h><CR>int main(int argc, char *argv[])<CR>{<CR><CR>return 0;<CR>}<ESC>
Perl heder, when you press F8:
map <F8> i#!/usr/bin/perl -w<CR><Left><Del>use strict;<CR>use warnings;<CR>use POSIX<ESC;>
Python header, press […]
A friend of mine, Hussemus (Homo codigus C plus plus) asked me how to integrate gcc into Vim to compile and run applications, like in Borland’s C++.
I made a search at Vim Website (search query: gcc) and found this interesting tip. You have to add these lines in your ~/.vimrc file:
map <F5> :call CompileRunGcc()<CR>
map […]