Thursday 23 July 2009

Latest google chrome build for linux


http://build.chromium.org/buildbot/snapshots/chromium-rel-linux/




Browse to the end of list and download last one.

Using any file manager or command line, extract chrome folder and make an link to /usr/bin or /usr/local/bin.

# unzip chrome-linux.zip
# su
# mkdir -p /opt/google
# mv chrome-linux /opt/google/
# ln -s /opt/google/chrome-linux/chrome /usr/bin/
# exit
# chrome




Starts very fast and has a nice aspect, but they still working on it to release an stable version. keep in touch.

My conky configuration



Download here

Wednesday 22 July 2009

More simple bash scripts

Script for start X session automatically, after making login ( without using any login manager)
#!/bin/bash
if (($(ps -A | grep -c X) > 0));
then
echo starting X....;startx;
fi

Script for unzip multiple files. Replacing "zip" extension name and "unzip" command on script, we can change to open other files as well.
#!/bin/bash
for file in *zip
do
unzip "$file"
done

Script to get links from an list every X time, for example, usefull to automatically open download links like rapidshare, netload, megaupload,...
Changing time and application, it can be useful to do lots of things =)
#!/bin/bash
waitTime=3600
app="/usr/bin/firefox"

cat $1 | while myLine=`line`
do
echo "Requesting" $myLine
$app $myLine;
sleep $waitTime && echo ""
done

Some usefull commands
Play random mp3
slocate *.mp3 | mpg321 -@ - -z

Play random mp3 from specific folder
slocate *.mp3 | grep /home/user/files/mp3/new/ | mpg321 -@ - -z

Download links from an text file list
wget -i file.txt

Download recursively all page files
wget -r http://url/folder/

Download sequentially files
curl -O http://url/img[01-99].png

Saturday 11 July 2009

Mount FTP as filesystem


CurlFtpFS is a filesystem for accessing FTP hosts based on FUSE and libcurl.

[Install]

localhost ~ # emerge net-fs/curlftpfs in gentoo
localhost ~ # apt-get install curlftpfs in ubuntu/debian
localhost ~ # ./configure && make && make install by the manual way

[Mount]

localhost ~ # modprobe fuse if you dont have fuse module loaded
localhost ~ # curlftpfs ftp://user:pass@site.com /mnt/mountpoint

[Umount]]

localhost ~ # fusermount -u /mnt/mountpoint

Thats it, now you can access with any file explorer like konqueror, nautilus…..we can do almost everything like edit source code

Adding on fstab
curlftpfs#ftp.host.com /mnt/mountpoint fuse rw,uid=500,user,noauto 0 0

or Making alias
alias mHost=’curlftpfs ftp://user:pass@site.com /mnt/mountpoint’

More int at http://curlftpfs.sourceforge.net/

Mount SSH as filesystem

SSHFS is a filesystem client based on the SSH File Transfer Protocol.

[Install]

localhost ~ # emerge sys-fs/sshfs-fuse in gentoo
localhost ~ # apt-get install sshfs in ubuntu/debian
localhost ~ # ./configure && make && make install manual way

[Mount]

localhost ~ # modprobe fuse if you dont have fuse module loaded
localhost ~ # sshfs user@site.com: /mnt/mountpoint use “-o allow_other” for share between multiple users

[Umount]

localhost ~ # fusermount -u /mnt/mountpoint

Thats it, now you can access with any file explorer like konqueror, nautilus…..we can do almost everything like edit source code, create, delete….

Adding on fstab
sshfs#USERNAME@REMOTE_HOST: REMOTE_PATH MOUNT_POINT fuse SSHFS_OPTIONS 0 0

or Making alias
alias mHost=’modprobe fuse;sshfs user@site.com: /mnt/mountpoint -o allow_other’

More info at http://fuse.sourceforge.net/

Friday 10 July 2009

Simple CTRL ALT DEL in linux




Install xkill
Attribute an shortcut to a key for xkill


And voilĂ , just click on window do you want to kill :D
(In picture on right, gimp is being killed)


Description: kill a client by its X resource

How to compile kernel script

Download here


cd
/usr/src/linux &&

echo "Running kernel configuration..." &&
make menuconfig &&

echo "Compiling kernel..." &&
make &&

echo "Installing kernel modules..." &&
make modules_install &&

echo "Making backup of old kernel..." &&
mv /boot/config /boot/config-old &&
mv /boot/System.map /boot/System.map-old &&
mv /boot/kernel /boot/kernel-old &&

echo "Installing new kernel..." &&
cp /usr/src/linux/System.map /boot &&
cp /usr/src/linux/.config /boot/config &&
cp /usr/src/linux/arch/i386/boot/bzImage /boot/kernel &&

echo done

Usefull bookmarks

archive.org (internet archive) --> see offline/old pages that is no longer online/available.
translate.google.com --> translate text, web pages and act as proxy =)

pastebin.com --> paste code
imageshack.us --> host images
sendspace.com --> upload files
filewatcher.com --> find files

whatismyip.com --> my ip
ipcalc --> calculate mask, wildcard mask, network address, min host, max host...
default_pass --> default passwords