Jan 29, 2010

List Books Shamela Part 1

Its hard to fight The laziness. More than a month I search on Shamela books list, but I just have nothing, I decide to make a simple grabber to catch all list, just use 2 hours I get it all, create and wait until it finished the job.

Some parts  are grabbed yet, i will post later if alls ready. Just use this list first. Okay,... Let's use this technology to assist us closer to God. Recite and research on Islamic science are never ended.  :)

you can use downloader or just create a simple script on perl or ruby or phyton to make a thread-download .

Here's the simple example on Ruby :
Save this list bellow to books.list

create a simple script downloader.rb

File.open("books.list", 'r').each do |f|
    Thread.new do
            system("wget #{f}")
            sleep 1
  end
end


run it with
ruby  ./downloader.rb


cat books.list
http://www.shamela.ws/books/107/10772.rar
http://www.shamela.ws/books/107/10773.rar
http://www.shamela.ws/books/107/10769.rar
http://www.shamela.ws/books/107/10759.rar
http://www.shamela.ws/books/107/10786.rar
http://www.shamela.ws/books/106/10619.rar
http://www.shamela.ws/books/107/10776.rar
http://www.shamela.ws/books/018/1817.rar
http://www.shamela.ws/books/122/12286.rar
http://www.shamela.ws/books/105/10549.rar
http://www.shamela.ws/books/107/10781.rar
http://www.shamela.ws/books/108/10814.rar
http://www.shamela.ws/books/108/10816.rar
http://www.shamela.ws/books/124/12445.rar
http://www.shamela.ws/books/225/22549.rar
http://www.shamela.ws/books/211/21108.rar
http://www.shamela.ws/books/225/22547.rar
http://www.shamela.ws/books/211/21113.rar
http://www.shamela.ws/books/124/12446.rar
http://www.shamela.ws/books/086/8630.rar
http://www.shamela.ws/books/225/22579.rar
http://www.shamela.ws/books/226/22657.rar
http://www.shamela.ws/books/226/22643.rar
http://www.shamela.ws/books/075/7525.rar
http://www.shamela.ws/books/226/22661.rar
http://www.shamela.ws/books/122/12293.rar
http://www.shamela.ws/books/226/22642.rar
http://www.shamela.ws/books/123/12304.rar
http://www.shamela.ws/books/227/22721.rar
http://www.shamela.ws/books/113/11353.rar
http://www.shamela.ws/books/124/12444.rar
http://www.shamela.ws/books/225/22551.rar
http://www.shamela.ws/books/034/3485.rar
http://www.shamela.ws/books/226/22653.rar
http://www.shamela.ws/books/117/11730.rar
http://www.shamela.ws/books/227/22793.rar
http://www.shamela.ws/books/227/22798.rar
http://www.shamela.ws/books/227/22797.rar
http://www.shamela.ws/books/075/7509.rar
http://www.shamela.ws/books/075/7570.rar
http://www.shamela.ws/books/118/11821.rar
http://www.shamela.ws/books/075/7571.rar
http://www.shamela.ws/books/085/8553.rar
http://www.shamela.ws/books/228/22808.rar
http://www.shamela.ws/books/228/22812.rar
http://www.shamela.ws/books/228/22804.rar
http://www.shamela.ws/books/085/8570.rar
http://www.shamela.ws/books/228/22852.rar
http://www.shamela.ws/books/229/22915.rar
http://www.shamela.ws/books/023/2305.rar
http://www.shamela.ws/books/229/22916.rar
http://www.shamela.ws/books/228/22853.rar
http://www.shamela.ws/books/228/22868.rar
http://www.shamela.ws/books/228/22870.rar
http://www.shamela.ws/books/107/10784.rar
http://www.shamela.ws/books/228/22800.rar
http://www.shamela.ws/books/228/22855.rar
http://www.shamela.ws/books/228/22876.rar
http://www.shamela.ws/books/228/22848.rar
http://www.shamela.ws/books/228/22874.rar
http://www.shamela.ws/books/228/22869.rar
http://www.shamela.ws/books/025/2569.rar
http://www.shamela.ws/books/229/22918.rar
http://www.shamela.ws/books/064/6400.rar
http://www.shamela.ws/books/228/22886.rar
http://www.shamela.ws/books/208/20855.rar
http://www.shamela.ws/books/228/22842.rar
http://www.shamela.ws/books/208/20854.rar
http://www.shamela.ws/books/180/18007.rar
http://www.shamela.ws/books/228/22895.rar
http://www.shamela.ws/books/228/22891.rar
http://www.shamela.ws/books/228/22890.rar
http://www.shamela.ws/books/228/22889.rar
http://www.shamela.ws/books/228/22888.rar
http://www.shamela.ws/books/066/6610.rar
http://www.shamela.ws/books/123/12300.rar
http://www.shamela.ws/books/162/16231.rar
http://www.shamela.ws/books/162/16232.rar
http://www.shamela.ws/books/109/10906.rar
http://www.shamela.ws/books/228/22877.rar
http://www.shamela.ws/books/183/18381.rar
http://www.shamela.ws/books/032/3283.rar
http://www.shamela.ws/books/072/7268.rar
http://www.shamela.ws/books/227/22799.rar
http://www.shamela.ws/books/227/22726.rar
http://www.shamela.ws/books/229/22912.rar
http://www.shamela.ws/books/000/0041.rar
http://www.shamela.ws/books/187/18795.rar
http://www.shamela.ws/books/228/22882.rar
http://www.shamela.ws/books/225/22592.rar
http://www.shamela.ws/books/229/22921.rar
http://www.shamela.ws/books/229/22910.rar
http://www.shamela.ws/books/229/22934.rar
http://www.shamela.ws/books/229/22922.rar
http://www.shamela.ws/books/229/22928.rar
http://www.shamela.ws/books/225/22593.rar
http://www.shamela.ws/books/230/23023.rar
http://www.shamela.ws/books/226/22676.rar
http://www.shamela.ws/books/231/23163.rar
http://www.shamela.ws/books/231/23100.rar
http://www.shamela.ws/books/026/2615.rar
http://www.shamela.ws/books/231/23177.rar
http://www.shamela.ws/books/105/10500.rar
http://www.shamela.ws/books/236/23611.rar
http://www.shamela.ws/books/235/23586.rar
http://www.shamela.ws/books/097/9776.rar
http://www.shamela.ws/books/020/2037.rar
http://www.shamela.ws/books/021/2163.rar
http://www.shamela.ws/books/257/25791.rar
http://www.shamela.ws/books/033/3328.rar
http://www.shamela.ws/books/114/11421.rar
http://www.shamela.ws/books/257/25794.rar
http://www.shamela.ws/books/258/25800.rar
http://www.shamela.ws/books/263/26324.rar
http://www.shamela.ws/books/263/26332.rar
http://www.shamela.ws/books/130/13088.rar
http://www.shamela.ws/books/261/26142.rar
http://www.shamela.ws/books/271/27107.rar
http://www.shamela.ws/books/113/11314.rar
http://www.shamela.ws/books/007/0727.rar
http://www.shamela.ws/books/263/26356.rar
Read more ...

Jan 28, 2010

install maktaba shamela on Ubuntu

For you who use shamela on windows, meanwhile you can use it on Ubuntu Karmic (9.10). Just follow my steps.

Add to your repository
sudo vim /etc/apt/sources.list
deb http://ppa.launchpad.net/sabily.team/ppa/ubuntu karmic main
deb http://ppa.launchpad.net/awn-testing/ubuntu karmic main


sudo apt-get update
sudo apt-get install noor
sudo apt-get install thwab
sudo apt-get install ttf-arabeyes
sudo apt-get install ttf-me-quran


The shamela books are available to be downloaded on these site :

http://shamela.ws
http://almeshkat.net
http://saaid.net/book/index.php
http://www.almaktba.com

here's some instance book links :

http://www.shamela.ws/books/106/10657.rar
http://www.shamela.ws/books/106/10649.rar
http://www.shamela.ws/books/099/9904.rar
http://www.shamela.ws/books/091/9134.rar
http://www.shamela.ws/books/084/8474.rar
http://www.shamela.ws/books/106/10659.rar
http://www.shamela.ws/books/099/9950.rar
http://www.shamela.ws/books/085/8565.rar
http://www.shamela.ws/books/099/9938.rar
http://www.shamela.ws/books/099/9943.rar
http://www.shamela.ws/books/099/9942.rar
http://www.shamela.ws/books/106/10641.rar
http://www.shamela.ws/books/099/9948.rar
http://www.shamela.ws/books/099/9988.rar
http://www.shamela.ws/books/107/10765.rar
http://www.shamela.ws/books/107/10701.rar
http://www.shamela.ws/books/106/10695.rar
http://www.shamela.ws/books/107/10767.rar
http://www.shamela.ws/books/106/10660.rar
http://www.shamela.ws/books/059/5923.rar
http://www.shamela.ws/books/090/9075.rar
http://www.shamela.ws/books/042/4289.rar
http://www.shamela.ws/books/107/10756.rar

After download these books, extract it, then open it with thwab. (the extension file must be .bok)
Read more ...

Jan 27, 2010

load balancing Huawei C261 ISP Speedy

Let's make load balancing internet with ISP and Huawei C261. Just follow this steps

Make sure that ISP is ready on eth0 and C261 on ppp0, you can check my previous posting  about how to setup ppp connection on ubuntu karmic 9.10. On this case the ISP gateway is 192.168.1.1 and ppp0 connection is assigned by dhcp server.


$ ifconfig eth0
eth0      Link encap:Ethernet  HWaddr 00:1e:33:22:4b:08 
          inet addr:192.168.1.3  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::21e:33ff:fe22:4b08/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:20472 errors:0 dropped:0 overruns:0 frame:0
          TX packets:24246 errors:0 dropped:0 overruns:0 carrier:1
          collisions:0 txqueuelen:1000
          RX bytes:14898826 (14.8 MB)  TX bytes:4689741 (4.6 MB)
          Interrupt:29



$ ifconfig ppp0
ppp0      Link encap:Point-to-Point Protocol 
          inet addr:10.10.8.107  P-t-P:10.17.4.12  Mask:255.255.255.255
          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1500  Metric:1
          RX packets:3945 errors:5 dropped:0 overruns:0 frame:0
          TX packets:4302 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:3
          RX bytes:2596124 (2.5 MB)  TX bytes:842762 (842.7 KB)



$ cat /etc/resolv.conf
# Generated by NetworkManager
# nameserver 208.67.222.222   => if you want to use openDNS
nameserver 192.168.1.1
nameserver 10.17.3.244


On list above NS of ISP is 192.168.1.1 and NS of ppp0 is 10.17.3.244. Now to make it simple, just create a new file loadbalance.sh, just like this :

$ vi loadbalance.sh

#!/bin/bash
RP0=`ip addr show ppp0 | grep inet | awk {'print $4'} | cut -d '/' -f1`
ET0=`ip addr show eth0 | grep global | awk {'print $2'} | cut -d '/' -f1 | cut -d '.' -f1,2,3`.1

sudo ip route replace default scope global nexthop via $ET0  dev eth0 weight 200 nexthop via $RP0  dev ppp0 weight 10

echo "------------- load Balanced  $ET0 => $RP0 "
ip route show
route -n


save it and change permission by running
chmod +x loadbalance.sh

now run the script with sudo privilege


$ sudo ./loadbalance.sh
------------- load Balanced  192.168.1.1 => 10.17.4.12
10.17.4.12 dev ppp0  proto kernel  scope link  src 10.10.8.107
10.42.43.0/24 dev wlan0  proto kernel  scope link  src 10.42.43.1  metric 2
192.168.1.0/24 dev eth0  proto kernel  scope link  src 192.168.1.3  metric 1
169.254.0.0/16 dev wlan0  scope link  metric 1000
default
    nexthop via 192.168.1.1  dev eth0 weight 200
    nexthop via 10.17.4.12  dev ppp0 weight 10
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
10.17.4.12      0.0.0.0         255.255.255.255 UH    0      0        0 ppp0
10.42.43.0      0.0.0.0         255.255.255.0   U     2      0        0 wlan0
192.168.1.0     0.0.0.0         255.255.255.0   U     1      0        0 eth0
169.254.0.0     0.0.0.0         255.255.0.0     U     1000   0        0 wlan0
0.0.0.0         192.168.1.1     0.0.0.0         UG    0      0        0 eth0 


$ ping www.google.com
PING www.l.google.com (64.233.181.104) 56(84) bytes of data.
64 bytes from ni-in-f104.1e100.net (64.233.181.104): icmp_seq=1 ttl=53 time=89.1 ms
64 bytes from ni-in-f104.1e100.net (64.233.181.104): icmp_seq=2 ttl=53 time=276 ms
^C


okay just try it...  :)
Read more ...

Nov 25, 2009

Free Fast Internet Mobile Connection

Telecom provider starting to gain their compete in getting customer, they make rapid campaign to get customer, the new trend was introduced by reduce their cost to zero in voice service, its opposite with data services. One of Telecom provider in Indonesia introduced special offer, they launch 4 SIM on bundled, its allow you to make free call among them.

We need internet not only in the office, but also mobile connection in fast. Subscribe  to internet mobile provider is so complicated since they downgrade quota and more expensive. Using existing internet connection in office as our server is one of solutions. Just use a simple server to handle ppp connection from clients.

New idea for this feature is making internet connection via voice service, we speedy need internet connection on server side and a server. Linux is recommended to do it. Server will serve as NAS, you can implement a simple RAS / Dial-in server or maybe you need radius to handle many users on server site. Calling on server, server will provide new ppp connection (could be pptp or l2tp as well) for each client. Afterwards, make a simple routing to share your internet connection to each ppp via modem.

Speed of this connections are still considerable. Its depend on client's modem and signal availabilities on their coverage area. CDMA EVDO Rev. A is recommended to implement this idea. (because of Telecom provider that i mentioned before give a free call among their bundled SIM is use CDMA).

Clients just need to make a simple ppp connection as common with changed number of it's dial. The dial number should be same as server side SIM number.

Allowing conference among them is also allow to make 4 connections in concur. So maximum clients for each modem on server is 3 connections.

Other improvement of this idea is make changeable connection types on server via SMS. Client maybe just need to make ppp connection to access their private files on samba server or make other VPN via this connection. They can send sms to make internet or just ppp without internet connection. Kannel is installed on server to handle sms request with a simple bash script to change connection types.

keywords :
Kannel (mini smsc), VPN, pptp, RAS, NAS, Dial-in server, ppp
Read more ...

Nov 24, 2009

Install ZTE C261 as Modem on Ubuntu Karmic (9.10)

I already upgrade my OS and now use Karmic. On Jaunty, I modify line of menu.lst on /boot/grub, but there is any changes on Karmic, so i want to write it down here since Karmic was not use menu.lst any longer.

This method is commonly used to mount USB on first startup. Other methods are also applicable, such as usbserial "usbserial.vendor=0x05c6 usbserial.product=0x9004" or other.

fist: check the number of vendor and product of your modem, in this case i use ZTE C261 as Modem.

root@leptop# lsusb
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 002: ID 064e:a101 Suyin Corp. Acer CrystalEye Webcam
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 006 Device 004: ID 05c6:9004 Qualcomm, Inc.
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 009: ID 0930:6544 Toshiba Corp. Kingston DataTraveler 2.0 Stick (2GB)
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub


second : edit your grub menu to recognize your USB device. Edit on /etc/default/grub, and changed it, see on source bellow.


root@leptop# vim /etc/default/grub
GRUB_DEFAULT=0
#GRUB_HIDDEN_TIMEOUT=0
GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_TIMEOUT=10
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash usbserial.vendor=0x05c6 usbserial.product=0x9004"
GRUB_CMDLINE_LINUX=""


last : update your grub by running update-grub

root@leptop # update-grub
Generating grub.cfg ...
Found linux image: /boot/vmlinuz-2.6.31-14-generic
Found initrd image: /boot/initrd.img-2.6.31-14-generic
Found memtest86+ image: /boot/memtest86+.bin
done




okay, now you need to restart your computer, and you can use this device to make ppp connection via wvdial or other software.

At the startup,  you may need to run modprobe to load usbserial module to Linux kernel, and wvdialconf to create default configuration file of wvdial so that you can edit this file, as shown bellow :

root@leptop # modprobe usbserial vendor=0x05c6 product=0x9004
root@leptop # wvdialconf
root@leptop # vim /etc/wvdial.conf 

The wvdial should be like this :

[Dialer Defaults]
Init1 = ATZ
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
Baud = 460800
Idle Seconds = 300
Stupid Mode = 1
Compuserve = 0
Asl Password = 0
FlowControl = CRTSCTS
Dial Command = ATDT
Modem Type = Analog Modem
New PPPD = yes
Modem = /dev/ttyUSB1
ISDN = 0
Phone = #777
Password = smart
Username = smart


As default, this connection will reset every 50 minutes, so you also need to change value of lcp-echo-failure, here is my lcp-echo-failure value :

cat /etc/ppp/options | grep lcp
# lcp-echo-failure option to detect that the peer is no longer connected.
lcp-echo-interval 30
# option requires a non-zero value for the lcp-echo-interval parameter.
lcp-echo-failure 9999994
Read more ...