Thursday, December 12, 2013

To Hide Page Name(href) When Printing

@media print { a[href]:after {display:none;} }

Monday, July 29, 2013

Delete All Files in Linux

find PATH -type f -maxdepth 1 -delete

Tuesday, July 23, 2013

USB Modem Set up At Linux

Checking iTegno 3800

  1. In the terminal window, go to “root”.
  2. At the command prompt, enter dmesg to list all components attached to your Linux machine.
  3. The iTegno modem will be identified as PL2303.C.
  4. A detected modem will be assigned to a USB address (eg: ttyUSB0) as shown below:
usb 4-2: new full speed USB device using uhci_hcd and address 2
usb 4-2: new device found, idVendor=0eba, idProduct=1080
usb 4-2: new device strings: Mfr=1, Product=2, SerialNumber=0
usb 4-2: Product: USB-Serial Controller
usb 4-2: Manufacturer: Prolific Technology Inc.
usb 4-2: configuration #1 chosen from 1 choice
usbcore: registered new driver usbserial
drivers/usb/serial/usb-serial.c: USB Serial support registered for generic
usbcore: registered new driver usbserial_generic
drivers/usb/serial/usb-serial.c: USB Serial Driver core
drivers/usb/serial/usb-serial.c: USB Serial support registered for pl2303
pl2303 4-2:1.0: pl2303 converter detected
usb 4-2: pl2303 converter now attached to ttyUSB0
usbcore: registered new driver pl2303
drivers/usb/serial/pl2303.c: Prolific PL2303 USB to serial adapter driver


Sending AT Commands in to iTegno 3800 using Minicom
 
NOTE: Minicom is usually included with Linux, however, it can also be downloaded separately.
  1. Open terminal console in Linux and enter minicom -s to open Minicom. Minicom menu will be displayed (as shown below).

  2. Select "Serial port setup". The Serial Port Setup menu will be displayed (as shown below).


  3. Select "A - Serial Device". Change the serial device to correspond with the address of the iTegno modem.
    In the above example, the serial device has been changed to ttyUSB0.
    Do ensure that the port settings are:
    • baud rate: 115200
    • data bits: 8
    • stop bits: 1
    • parity: none
    • hardware flow control: none

  4. Save setup as default and exit.
    Upon exit, a terminal screen will be displayed.
    You are now able to send AT commands to the iTegno modem via minicom.
    To exit Minicom, enter followed by Z to list all commands.
    Select the command to exit.
--------------------------------------------------------------
  
sudo adduser dialout
groups
----------------------------------------------------------------------
chmod a+w /dev/ttyUSB0? This is not sure. ---------------------------------------------------------------------
$fd = fopen('/dev/ttyUSB0','w'); fwrite($fd,'AT+CMGS="+659223290"'.chr(13).'helloword'.chr(26)); fclose($fd);

Sunday, July 7, 2013

Setting Up PHP at Ubuntu


sudo apt-get install apache2
sudo apt-get install php5
sudo apt-get install libapache2-mod-php5
sudo /etc/init.d/apache2 restart sudo apt-get install mysql-server

apt-get install php5-mysql mysql-client

Monday, February 11, 2013

Installing MySQL And Set Data Folder At Different Path At Windows Server

When installing MySQL, choose "Customer" type and choose different installation path. If you also want to set Data folder indifferent path, choose your designated path at choosing data path page. After that open my.inf and change the path of "datadir" to your designated path. And then stop mysql, and copy the Data folder from "C:\ProgramData\MySQL\Data" to your path using [xcopy "C:\ProgramData\MySQL\MySQL Server 5.1\data" F:\mydrivefolder\data /s]. And then start mysql again.

To start mysql, use [net start mysql] and use [net stop mysql] to stop.

Monday, December 24, 2012

To set up virtual network

http://social.technet.microsoft.com/Forums/en-US/w7itpronetworking/thread/259c7ef2-3770-4212-8fca-c58936979851/

- very useful for web application which is set up at PC and which does not have internet connection.

Monday, December 17, 2012

how to disable third party repositories

     Sam_ (and-sam) said : #2
System administration -> software sources -> third party
https://help.ubuntu.com/community/Repositories/Ubuntu#Third-Party%20Software%20Tab
## Fix broken packages
via CLI method (other apps, such as Synaptic, Software Sources, Update Manager should be closed):
sudo dpkg --configure -a
sudo apt-get -f install
sudo apt-get --fix-missing install
## Clean up package cache
sudo apt-get autoclean
sudo apt-get autoremove
## Update
sudo apt-get update
sudo apt-get upgrade
Reference:
http://library.gnome.org/users/gnome-terminal/stable/gnome-terminal-get-started.html.en
https://help.ubuntu.com/community/RootSudo#Usage
https://help.ubuntu.com/community/AptGet/Howto
https://help.ubuntu.com/community/SynapticHowto


From : https://answers.launchpad.net/ubuntu/+source/apt/+question/99388