Too Cool for Internet Explorer


Swobodin's Profile | Swobodin's Blog | Back to Fedora Tunisia

Archive for the 'UNIX' Category

Looking for something? Grep for it

Saturday, January 13th, 2007

grep -i juice fridge
Returned one result

Perl uniq array, to remove duplications

Thursday, September 21st, 2006

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 {
[…]

Road to Perdition

Monday, September 18th, 2006

Thanks Kaiser for the pic …

Berkeley California

Thursday, August 17th, 2006

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 […]

Easter Eggs

Thursday, May 4th, 2006

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 […]

The ABC’s of UNIX

Friday, December 23rd, 2005

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, […]

Malicious program

Wednesday, November 9th, 2005

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; […]

Vim Macros

Monday, October 31st, 2005

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 […]

Vim + GCC

Friday, September 23rd, 2005

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 […]


Top Tunisie Blogs