1 ธ.ค. 2558

How to fix "A disk read error"

  1. Boot from the installation media
  2. Click Repair your computer or press R
  3. Click Troubleshoot
  4. Click Advanced options
  5. Click Command Prompt
  6. Type the commands and press Enter after each:
    bootrec /rebuildbcd
    bootrec /fixmbr
    bootrec /fixboot
  7. Type exit and press Enter to quit Command Prompt
  8. Restart the computer

11 ก.ย. 2558

Fix MBR ใน Windows 7

1.ใส่แผ่นการติดตั้ง Windows 7 ลงในเครื่อง ,หลังจากนั้นรีสตาร์ทแล้วบูทเครื่องจากแผ่นการติดตั้ง.
2.เลือกกภาษาแล้วคลิก Next .

15 ส.ค. 2558

How to block and unblock Bittorrent of mikrotik.

1. IP > Firewall > Layer7 Protocols
กด " + " เพื่อสร้าง Firewall L7 Protocol
ใส่ "^(\x13bittorrent protocol|azver\x01$|get /scra
pe\?info_hash=get /announce\?info_hash=|get /client/bitcomet/|GET /dat
a\?fid=)|d1:ad2:id20:|\x08'7P\)[RP]"

9 ส.ค. 2558

การเปลี่ยน default character set ของเว็บไซต์เป็น tis-620


สร้างไฟล์ .htaccess ขึ้นมา จากนั้นก็เพิ่มข้อมูลในไฟล์เข้าไปดังนี้
AddDefaultCharset tis-620
จากนั้นจึงทำการ Upload ไฟล์ .htaccess เข้าไปใน /htdocs ซึ่งเป็น Directory Path เริ่มต้นของเว็บไซต์

6 ส.ค. 2558

Jquery plugin create calendar Thailand the datepicker.

1. Download Jquery Plugin And add
  1. <script src="js/jqueryui_datepicker_thai.js"></script>  
2. add
  1. <?php    
  2. $jquery_ui_v="1.8.5";    
  3. $theme=array(    
  4.     "0"=>"base",    
  5.     "1"=>"black-tie",    
  6.     "2"=>"blitzer",    
  7.     "3"=>"cupertino",    
  8.     "4"=>"dark-hive",    
  9.     "5"=>"dot-luv",    
  10.     "6"=>"eggplant",    
  11.     "7"=>"excite-bike",    
  12.     "8"=>"flick",    
  13.     "9"=>"hot-sneaks",    
  14.     "10"=>"humanity",    
  15.     "11"=>"le-frog",    
  16.     "12"=>"mint-choc",    
  17.     "13"=>"overcast",    
  18.     "14"=>"pepper-grinder",    
  19.     "15"=>"redmond",    
  20.     "16"=>"smoothness",    
  21.     "17"=>"south-street",    
  22.     "18"=>"start",    
  23.     "19"=>"sunny",    
  24.     "20"=>"swanky-purse",    
  25.     "21"=>"trontastic",    
  26.     "22"=>"ui-darkness",    
  27.     "23"=>"ui-lightness",    
  28.     "24"=>"vader"    
  29. );    
  30. $jquery_ui_theme=$theme[22];    
  31. ?>    
  32. <link type="text/css" rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/<?=$jquery_ui_v?>/themes/<?=$jquery_ui_theme?>/jquery-ui.css" />    
  33. <style type="text/css">    
  34. /* ปรับขนาดตัวอักษรของข้อความใน tabs   
  35. สามารถปรับเปลี่ยน รายละเอียดอื่นๆ เพิ่มเติมเกี่ยวกับ tabs  
  36. */    
  37. .ui-tabs{    
  38.     font-family:tahoma;    
  39.     font-size:11px;    
  40. }    
  41. </style>    
  42. <style type="text/css">  
  43. /* Overide css code กำหนดความกว้างของปฏิทินและอื่นๆ */  
  44. .ui-datepicker{  
  45.     width:220px;  
  46.     font-family:tahoma;  
  47.     font-size:11px;  
  48.     text-align:center;  
  49. }  
  50. </style>  
3. add

2 ส.ค. 2558

Internet Sharing on Windows 8,8.1

1. cmd >> Run as administration
2. Type the command "netsh wlan show drivers".
3. Next, type the command "netsh wlan set hostednetwork mode = allow ssid = <network name> key = <passkey>".
4. Start WIFI type the command " netsh wlan start hostednetwork "  
5visit Network and Internet –> Network Connections,--> Properties --> sharing 

 

2 ก.ค. 2558

How to fix sudo: unable to change to sudoers gid: Operation not permitted

From the console Ctrl+Alt+F1 I logged in, then did the
sudo chown -R user:user /home/user/.*

How to fix grub error file not found

Use Boot Repair to fix your bootloader.
  1. Boot Ubuntu from a LiveCD or Live USB
  2. Connect to the internet
  3. Open a terminal, and add the Boot Repair PPA
    sudo add-apt-repository ppa:yannubuntu/boot-repair && sudo apt-get update
  4. Install Boot Repair
    sudo apt-get install -y boot-repair && boot-repair

26 มิ.ย. 2558

How to install Wine for Ubuntu 12.04

#sudo add-apt-repository ppa:ubuntu-wine/ppa 
#sudo apt-get update
#sudo apt-get install wine1.4
 
install dependencies
 #sudo winetricks atmlib gdiplus msxml3 msxml6 vcrun2005 vcrun2005sp1 vcrun2008 ie6 fontsmooth-rgb gecko  

How to install LibreOffice for Ubuntu 12.04

#sudo add-apt-repository ppa:libreoffice/ppa
#sudo apt-get update
#sudo apt-get install libreoffice

16 มิ.ย. 2558

To change the boot order of GRUB

Open /boot/grub/grub.cfg
Change set default=0

CONFIG ROUTE DUAL WAN LOAD BALANCING USING PCC WITH FAIL OVER

/ip route
# Adding static routes for Google/TW which will be used further below to test both WAN link connectivity
add dst-address=8.8.8.8 gateway=192.168.9.1 scope=10
add dst-address=8.8.4.4 gateway=202.29.216.30 scope=10

## Now we create route for PCC marked packets routing mark:
add distance=1 gateway=8.8.8.8 routing-mark=to_WAN1 check-gateway=ping

4 มิ.ย. 2558

แก้ไขปุ่ม menu smf

สมมุติว่าแก้ไข link ปุ่ม login

เปิดไฟล์ sources/subs.php

CTRL + F พิมคำว่า "login"

จะเจอ

'login' => array(
    'title' => $txt['login'],
    'href' => $scripturl . '?action=login',
    'show' => true,
    'sub_buttons' => array(

เพิ่มความยาวตัวอักษรของหัวข้อกระทู้ SMF 2.0

แก้ไขไฟล์ Post.template.php ที่อยู่ใน Themes/default/Post.template.php

// Now show the subject box for this post.
   echo '
      <dt>
         <span', isset($context['post_error']['no_subject']) ? ' class="error"' : '', ' id="caption_subject">', $txt['subject'], ':</span>
      </dt>
      <dd>
         <input type="text" name="subject"', $context['subject'] == '' ? '' : ' value="' . $context['subject'] . '"', ' tabindex="', $context['tabindex']++, '" size="80" maxlength="80" class="input_text" />
      </dd>
      <dt class="clear_left">
         ', $txt['message_icon'], ':
      </dt>
      <dd>

25 มี.ค. 2558

แก้ไขลำดับการบูทของ grub

ให้แก้ไขแฟ้ม /etc/default/grub
แก้ไขบรรทัดนี้โดยให้เลข 0 เป็นลำดับของ os ที่จะ boot เป็นอันแรก
GRUB_DEFAULT=0  

การแก้ไขชื่ออันดับหรือจะลบบางอันทิ้งให้ไปแก้ไขไฟล์
/boot/grub/grub.cfg

How to Install Open Office in Kali Linux

#nano /etc/apt/sources.list

just add the following repositories in this file:

deb [arch=i386,amd64,armel,armhf] http://http.kali.org/kali kali-dev main contrib non-free
deb [arch=i386,amd64,armel,armhf] http://http.kali.org/kali kali-dev main/debian-installer
deb http://http.kali.org/kali kali main contrib non-free
deb-src http://http.kali.org/kali kali main contrib non-free
deb-src http://security.kali.org/kali-security kali/updates main contrib non-free


#apt-get update
#apt-get install openoffice.org  

24 มี.ค. 2558

How to Create a Wireless Ad Hoc in Windows 8

Step 1:Open the Command Prompt (CMD)
Step 2:Type in the following command to ensure that your network interface supports Hosted Network feature:
netsh wlan show drivers
If Hosted network supported shows “Yes”, that’s great.
If it says “No”, you can try to update your wireless driver. If the updated driver still does not help, then you need to upgrade your hardware.

12 มี.ค. 2558

บล็อก baidu ด้วย iptables

1.เพิ่มคำสั่ง บล็อกด้วย string ลงใน chain magle
#iptables -t mangle -A PREROUTING -p tcp --dport 80 -m string --string 'baidu' --algo bm -j DROP

2.DROP จาก Domain โดยใช้ dig
#iptables -t mangle -A PREROUTING -d $(dig @8.8.8.8 upf.bav.baidu.com +short) -j DROP

3.มองดูผลงาน
#iptables -t mangle -nvxL | grep DROP

11 มี.ค. 2558

เปลี่ยน time stamp ใน access.log ของ squid3 โดยใช้ logformat

เพิ่ม

logformat common %{%Y-%m-%d %H:%M:%S}tl %6tr %>a %Ss/%03Hs %<st %rm %ru %un %Sh/%<A %mt
cache_access_log  /var/log/squid/access.log common


แทนที่

cache_access_log  /var/log/squid3/access.log

ลงในไฟล์ /etc/squid3/squid.conf

เสร็จแล้วทำการ reload config ของ squid3 ใหม่ ด้วยคำสั่ง

/etc/init.d/squid3 restart

19 ก.พ. 2558

เพิ่มตำแหน่งการติดตั้ง module ใน joomla 1.5

1. เปิดไฟล์ templateDetails.xml ที่อยู่ใน Template นั้นๆ โดยการเพิ่ม code ไปใน tag positions ดังตัวอย่างด้านล่างนี้


<positions>

    <position>breadcrumb</position>

    <position>left</position>

    <position>right</position>

    <position>top</position>

    <position>user1</position>

    <position>user2</position>

    <position>user3</position>

    <position>user4</position>

    <position>footer</position>

    <position>debug</position>

    <position>syndicate</position>

    <position>myPosition</position>

</positions>


2. แก้ไขไฟล์ index.php ของ Template โดยการเพิ่ม code ด้านล่างลงไปยังตำแหน่งที่ต้องการ


<jdoc:include type="modules" name="myPosition" />

15 ก.พ. 2558

How to fix ink absorber is full on MP237

1.  Turn off printer
2.  Press and hold STOP/RESET button
3.  Press and hold POWER button
4.  Release STOP/RESET button (POWER button still pressed)
5.  In condition POWER button still pressed, press and released STOP/RESET six times (6x)
6.  Released POWER button
7. The service tool v3400
8.  Clear Ink Counter - Absorber = MAIN - click SET - OK.
       Wait a few seconds, printer will printing D=000.0
9.  Ink Absorber Counter - Absorber = MAIN - click SET - OK
10. Turn off printer.
11. Turn on printer and try to printing.
      If show error "The following ink may have run out",
      press and hold STOP/RESET seven seconds (7 seconds). FINISH

2 ก.พ. 2558

การ Bypass website ของ Mikrotik

/ip hotspot walled-garden ip
add action=accept disabled=no dst-host=XXXXXXXXXXXXXXXXX.XXX

 XXXXXXXXXXXXXXXXX.XXX คือ ชื่อ Host ที่เราต้องการ bypass

21 ม.ค. 2558

intstall firefox on kali linux


#apt-get remove iceweasel
#echo -e "\ndeb http://downloads.sourceforge.net/project/ubuntuzilla/mozilla/apt all main" | tee -a /etc/apt/sources.list > /dev/null
#apt-key adv --recv-keys --keyserver keyserver.ubuntu.com C1289A29
#apt-get update
#apt-get install firefox-mozilla-build

20 ม.ค. 2558

Unzip .tar.bz2

tar xvjf filename.tar.bz2
Which will untar it to the current directory. Normally (99% of the time) it will create it's own subdirectory so you don't need to worry about that.
Just so you know:
tar - Tape ARchiver
And the options:
x - extract
v - verbose output (lists all files as they are extracted)
j - deal with bzipped file
f - read from a file, rather than a tape device

"tar --help" will give you more options and info