Thursday, July 29, 2010

translate stuff

http://translate.google.com/#auto|id|decent

use it with your cell.phone... it works with gprs enabled
no need dictionary on the hand

chm stuff

it works guyz
1. sudo apt-get install dctrl-tools
2. sudo grep-aptavail -F"Depends" -F"Recommends" -F"Suggests" -sPackage python-gtkhtml2
3. sudo dpkg -i python-gtkhtml2_2.25.3-3ubuntu1_i386.deb (thank you Savvas radevick for download link)
4. sudo apt-get install -f
5. sudo apt-get install gnochm

then gnochm works

archmage convert from chm to html

chmsee as alternative to gnochm

/etc/fstab

# /etc/fstab: static file system information.
#
# Use 'blkid -o value -s UUID' to print the universally unique identifier
# for a device; this may be used with UUID= as a more robust way to name
# devices that works even if disks are added and removed. See fstab(5).
#
#
proc /proc proc nodev,noexec,nosuid 0 0
# / was on /dev/sda2 during installation
UUID=0f7470af-a199-47b1-a3d8-4f93f1e56933 / ext4 errors=remount-ro 0 1
LABEL=storage /var ext4 defaults 0 2
/var/tmp /tmp none bind 0 0
/var/private /home none bind 0 0
/var/local/usr /usr none bind 0 0
# /windows was on /dev/sda5 during installation
UUID=570D2BBC07FEB79C /windows ntfs defaults,nls=utf8,umask=007,gid=46 0 0
# swap was on /dev/sda6 during installation
UUID=16a56377-7bfe-4d7f-a64f-3e203dba3538 none swap sw 0 0

/dev/sdc3 /media/doc fuseblk rw,nosuid,nodev,allow_other,blksize=4096 0 0

Tuesday, July 27, 2010

virtualbox stuff

ifconfig eth0 0.0.0.0 up && brctl addbr br0 && brctl addif br0 eth0 && ifconfig br0 10.151.35.203 netmask 255.255.255.0 up && tunctl -t tap1 -u chika && brctl addif br0 tap1 && ifconfig tap1 0.0.0.0 up && route add default gw 10.151.35.1
ifconfig eth0 0.0.0.0 up && brctl addbr br0 && brctl addif br0 eth0 && ifconfig br0 10.151.35.203 netmask 255.255.255.0 up && tunctl -t tap0 -u python && brctl addif br0 tap0

Eg: (works)
sudo ifconfig eth0 0.0.0.0 up && sudo brctl addbr br0 && sudo brctl addif br0 eth0 && sudo ifconfig br0 10.151.35.203 netmask 255.255.255.0 up && sudo tunctl -t tap0 -u python && sudo brctl addif br0 tap0 && route add default gw 10.151.35.1

wget stuff

#http_proxy = http://10.126.12.37:9999/
#ftp_proxy = http://10.126.12.37:9999/

#http_proxy = http://10.126.12.27:9999/
#ftp_proxy = http://10.126.12.27:9999/
proxy-password=topsecret
proxy-user=princeofun@chem.its.ac.id

http_proxy = http://202.46.129.10:8080/
ftp_proxy = http://202.46.129.10:8080/

audio stuff

ubuntu@ubuntu:~$ wget -O alsa-info.sh http://212.20.107.51/alsa-info.sh
--2009-11-25 14:15:37-- http://212.20.107.51/alsa-info.sh
Connecting to 212.20.107.51:80... connected.
HTTP request sent, awaiting response... 302 Found
Location: http://git.alsa-project.org/?p=alsa-driver.git;a=blob_plain;f=utils/alsa-info.sh [following]
--2009-11-25 14:15:38-- http://git.alsa-project.org/?p=alsa-driver.git;a=blob_plain;f=utils/alsa-info.sh
Resolving git.alsa-project.org... 212.20.107.51
Reusing existing connection to 212.20.107.51:80.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/plain]
Saving to: `alsa-info.sh'

[ <=> ] 26,584 69.6K/s in 0.4s

2009-11-25 14:15:38 (69.6 KB/s) - `alsa-info.sh' saved [26584]

ubuntu@ubuntu:~$ bash alsa-info.sh --pastebin
ALSA Information Script v 0.4.58
--------------------------------

This script visits the following commands/files to collect diagnostic
information about your ALSA installation and sound related hardware.

then

vi /etc/modprobe.d/alsa-base.conf
add this line to the file above

# Keep snd-pcsp from being loaded as first soundcard
options snd-pcsp index=-2
alias snd-card-0 snd-hda-intel
alias sound-slot-0 snd-hda-intel
options snd-hda-intel model=hp-dv5
options snd-hda-intel enable_msi=1

source:

http://ubuntuforums.org/showthread.php?t=1341751&highlight=HP+G71+Sound+Problem

vim stuff

Try these examples:

  • Enter :help to browse help. Scroll down the help page to see the quickref and tutor links, and the table of contents.
  • Enter :help pattern for help on the topic pattern (for example).
  • :h pattern is the same (the :help command can be abbreviated).

Command completion can be used when entering a help topic:

  • Type :h patt then press Ctrl-D to list all topics that contain "patt".
  • Type :h patt then press Tab to scroll through the topics that start with "patt".
  • If you have set the 'wildmenu' option (e.g. by using :set wildmenu), then :h patt followed by opens a menu on the statusline, with all help topics containing "patt". You can select any item in the menu with the arrow keys or more presses of the key to fill in the rest of your command line.

Links:

  • Enter :h to open the main help page.
  • Type /quick to search for "quick" (should find the quickref link).
  • Press Ctrl-] to follow the link (jump to the quickref topic).
  • After browsing the quickref topic, press Ctrl-T to go back to the previous topic.
  • You can also press Ctrl-O to jump to older locations, or Ctrl-I to jump to newer locations.

Searching:

  • Search within a help file using / like you would when searching any file.
  • Search all the help files with the :helpgrep command, for example:
:helpgrep \csearch.\{,12}file
\c means the pattern is case insensitive.
The pattern finds "search" then up to 12 characters followed by "file".
You will then see the first match. To see other matches for the same pattern, use:
:cnext
:cprev
:cnfile
:cpfile
:cfirst
:clast
and even
:cc
which brings you back to the current match after you scrolled the helpfile, or
:copen
which will list out all the matches in a separate window. Read up on these commands with the :help entry for each of them!

Each week (or more often if you prefer), read a new section from the :help page to learn something new!

irc stuff

  • Irssi - Popular command line/text based IRC client.

  • WeeChat - Another popular command line/text based IRC client.

  • Pidgin another multiple protocol with gui

irc.freenode.net
fishcooker
/msg NickServ identify

via web
http://webchat.freenode.net/#
http://mibbit.com/

apt.conf

ACQUIRE {
http::proxy "http://localhost:22222/"
}

APT::Get::AutomaticRemove "true";
APT::Install-Recommends "false";
APT::Get::force-yes "true";
APT::Get::Assume-Yes "true";

deb http://10.151.35.203/lucid lucid main restricted universe multiverse
deb http://10.151.35.203/lucid lucid-updates main restricted universe multiverse
deb http://10.151.35.203/lucid lucid-security main restricted universe multiverse
deb http://10.151.35.203/lucid lucid-backports main restricted universe multiverse
deb http://10.151.35.203/lucid lucid-proposed main restricted universe multiverse

tunneling ssh dynamic

ssh -p source_port -D local_dynamic_port -f -N username@ip_remote_host
ssh -f -N -L local_dynamic_port:localhost:source_port username@ip_remote_host

Friday, July 23, 2010

make BIND9 work

root@earth:/etc/bind# cat /etc/bind/named.conf.local
//
// Do any local configuration here
//

// Consider adding the 1918 zones here, if they are not used in your
// organization
//include "/etc/bind/zones.rfc1918";

zone "gridgalaxy.org" {
type master;
file "/etc/bind/zones/gridgalaxy.org.zone";
};

zone "35.151.10.in-addr.arpa" {
type master;
file "/etc/bind/zones/rev.35.151.10.in-addr.arpa";
};
root@earth:/etc/bind# cat /etc/bind/zones/gridgalaxy.org.zone
gridgalaxy.org. IN SOA ns1.gridgalaxy.org. admin.gridgalaxy.org. (
2006071801
28800
3600
604800
38400 )
gridgalaxy.org. IN NS ns1.gridgalaxy.org.
gridgalaxy.org. IN MX 10 mta.gridgalaxy.org.

www IN A 10.151.35.203
mta IN A 10.151.35.203
ns1 IN A 10.151.35.203
earth IN A 10.151.35.203
saturn IN A 10.151.35.203

root@earth:/etc/bind# cat /etc/bind/zones/rev.35.151.10.in-addr.arpa
@ IN SOA ns1.gridgalaxy.org. admin.gridgalaxy.org. (
2006071801; serial
28800; refresh, seconds
604800; retry, seconds
604800; expire, seconds
86400 ); minimum, seconds

IN NS ns1.gridgalaxy.org.

203 IN PTR gridgalaxy.org

root@earth:/etc/bind# cat /etc/resolv.conf
nameserver 10.151.35.203
nameserver 202.46.129.2

root@earth:/etc/bind# /etc/init.d/bind9 restart

root@earth:/etc/bind# nslookup saturn.gridgalaxy.org
Server: 10.151.35.203
Address: 10.151.35.203#53

Name: saturn.gridgalaxy.org
Address: 10.151.35.203

root@earth:/etc/bind# nslookup google.com
Server: 202.46.129.2
Address: 202.46.129.2#53

Non-authoritative answer:
Name: google.com
Address: 72.14.254.104

debmirroring

+++++++++++++++++++++++++++++++++++
DISTS="hardy,hardy-backports,hardy-security,hardy-updates"
SECTION="main,multiverse,restricted,universe"
ARCH="i386"
debmirror --ignore-release-gpg --verbose --method=ftp --host=mirror.its.ac.id \
--dist=$DISTS --section=$SECTION \
--arch=$ARCH --nosource --root=ubuntu \
--diff=mirror --ignore-small-errors /hardy
+++++++++++++++++++++++++++++++++++

DISTS="lucid,lucid-backports,lucid-security,lucid-updates"
SECTION="main,multiverse,restricted,universe"
ARCH="i386"
debmirror --verbose --method=http --host=kambing.ui.ac.id --dist=$DISTS --section=$SECTION --arch=$ARCH --nosource --root=ubuntu --ignore-release-gpg /home/globus/mnt/3/lucid
+++++++++++++++++++++++++++++++++++

save one of those on the file then execute it

passwordless ssh login

globus@saturn:~$ ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/home/globus/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/globus/.ssh/id_rsa.
Your public key has been saved in /home/globus/.ssh/id_rsa.pub.
The key fingerprint is:
86:2b:cd:71:7b:9f:63:68:39:38:b8:6b:8d:b0:20:57 globus@saturn
The key's randomart image is:
+--[ RSA 2048]----+
| |
| |
| |
| E . |
| . o S |
|. o .o = . |
| o ..o++...o |
| ..+ +.=.o. |
| .oo o oo. |
+-----------------+

globus@saturn:~$ scp /home/globus/.ssh/id_rsa.pub globus@10.151.35.203:/home/globus/.ssh/authorized_keys
globus@10.151.35.203's password:
id_rsa.pub 100% 395 0.4KB/s 00:00

globus@saturn:~$ ssh 10.151.35.203
Linux earth 2.6.32-23-generic-pae #37-Ubuntu SMP Fri Jun 11 09:26:55 UTC 2010 i686 GNU/Linux
Ubuntu 10.04 LTS

Welcome to Ubuntu!
* Documentation: https://help.ubuntu.com/

System information as of Fri Jul 23 05:54:00 EDT 2010

System load: 0.14 Swap usage: 0% Users logged in: 1
Usage of /home: 4.4% of 35.77GB Temperature: 40 C
Memory usage: 4% Processes: 99

Graph this data and manage this system at https://landscape.canonical.com/

Last login: F
Publish Post
ri Jul 23 05:27:08 2010
globus@earth:~$
[yip2 it works, do it vice versa]