กันลืม

mount disk linux

เมื่อเราทำการเพิ่ม hdd เข้าไปใหม่นั้นเราจำเป็นต้อง ทำการ mount disk ดังกล่าวไปตาม path ที่เราต้องการ คำสั่งเพื่อตรวจสอบ disk และ patition #cat /etc/fstab : ดู file system table เพื่อบอกว่ามีอะไร mount ไว้แล้วบ้าง #cat /etc/mtab : ดูรายละเอียดการ mount ในอีกรูปแบบหนึ่ง #cat /proc/mounts : บอกว่ามีอะไร mount ไว้แล้วบ้าง #cat /proc/partitions : บอกชื่อ และขนาดของแต่ละ partitions #cat /proc/filesystems : บอกประเภทของ filesystems ที่มีการสนับสนุน #/sbin/fdisk -l : แสดง partition จาก harddisk ทุกตัวที่เชื่อมต่อในเครื่องนั้น …

คำสั่ง flush memory

คำสั่ง flush memory echo 3 > /proc/sys/vm/drop_caches

IPtables ป้องกัน SSH Brute Force

IPtables ป้องกัน SSH Brute Force # iptables -N SSH # iptables -N SSH_ABL # iptables -A SSH -m recent –name SSH_ABL –update –seconds 3600 -j REJECT # iptables -A SSH -m recent –name SSH –rcheck –seconds 60 –hitcount 5 -j SSH_ABL # iptables -A SSH_ABL -m recent –name SSH_ABL –set -j LOG –log-level warn –log-prefix …

Sphinx Full Text Search config Example

# # Minimal Sphinx configuration sample (clean, simple, functional) # source src { type = mysql sql_host = localhost sql_user = root sql_pass = root sql_db = sphinx sql_port = 3306 # optional, default is 3306 sql_query_pre = SET NAMES utf8 sql_query_pre = SET collation_connection = utf8_general_ci } source tag:src { sql_query = \ SELECT …

Varnishtop command

varnishtop [-1] [-b] [-C] [-c] [-d] [-f] [-I regex] [-i tag] [-n varnish_name] [-r file] [-V] [-X regex] [-x tag] Description The varnishtop utility reads varnishd(1) shared memory logs and presents a continuously updated list of the most commonly occurring log entries. With suitable filtering using the -I, -i, -X and -x options, it can …

openbox อ่านการ์ด

Menu>Tools>CA Slot Setting>Edit Smartcard Config>กดปุ่มเขียว ACS ค่านี้สำหรับคาร์ด Tรู ให้ใส่ 0605 แต่ถ้าเป็น dtv ให้ใส่ 0505 Caid ค่านี้สำหรับคาร์ด Tรู ให้ใส่ 0604 แต่ถ้าเป็น dtv ให้ใส่ 0614 Camkey ตรงบรรทัดนี้ให้ใส่ 0 ไป 16 ตัว Camdata ตรงนี้ก็เช่นกันให้ใส่ 0 ไปบรรทัดละ 32 ตัว (จะมี 4 บรรทัดด้วยกัน) เมื่อป้อนครบหมดแล้ว ให้กดปุ่มเหลือง>Exit จะขึ้น saving data, please wait ก็กดออกไปเรื่อย แล้วลองดูครับ

ไฟล์เรียงช่อง supernet dreamer drsat 2011/07/16

การแก่ไขช่องรายการ 1.ทำการ Download ไฟล์  Download ไฟล์เรียงช่อง_2011-07-16 2.ทำการ คลาย zip ออก จะได้ไฟล์นามสกุล .bin 3. copy ใส่ flashdrive 4.เสียบ flash drive เข้าที่ port usb ด้านหลังเครื่อง 5.กดปุ่ม Menu ที่ Remote เลือก USB Function -> sda1 -> ไฟล์ที่ copy ใส่ flash drive -> software 6.เครื่องจะทำการ reboot เท่านี้ก็เป็นอันเรียบร้อย ขอให้สนุกครับ

ทำ Gtalk ให้เป็น web online support

หากท่านมีเว็บไซด์สำหรับขายของเป็นของตัวเอง แล้วอยากให้ มีระบบ web online support และท่านใช้งาน gtalk อยู่เป็นประจำแล้วละก็ วันนี้ผมมีวิธีที่ทำให้ gtalk ของเราเป็น web support ได้ครับ 1.ทำการสร้าง script สำหรับนำไปแปะที่หน้าดเ็บโดยเข้าไปที่ http://www.google.com/talk/service/badge/New 2. ทำการ login เข้าระบบ ด้วย account gtalk ของท่าน หากยังไม่มีก็สามารถสมัครใหม่ได้ครับ และหากท่านใด ที่ใช้บริการ google app engine ก็สามารถที่จะนำ account นั้นมา login ใช้งานได้ครับ domain 3.ทำากรสร้าง script ตามต้องการครับ และนำ script นั้นไปแปะที่เว็บท่านได้เลยครับ 4. ตัวอย่าง script ที่ผมใช้

Enable gzip compression ให้ Nginx และ Apache

nginx # output compression saves bandwidth gzip on; gzip_http_version 1.1; gzip_vary on; gzip_comp_level 6; gzip_proxied any; gzip_types text/plain text/html text/css text/javascript text/xml application/json application/javascript application/x-javascript application/xhtml+xml application/xml application/xml+rss ; # make sure gzip does not lose large gzipped js or css files gzip_buffers 16 8k; # Disable gzip for certain browsers. gzip_disable “MSIE [1-6].(?!.*SV1)”; Apache …

แก้ link ภาษาไทยใน web browser บนandroid Motorola charm

การแก้ไขได้เครื่องต้องผ่านการ root ก่อนนะครับ วิธีการ root สามารถหาได้จากใน blog นี้เลยครับ 1.ให้ทำการ download android sdk ก่อนครับ โหลดได้ที่ http://developer.android.com/sdk/index.html 2.ให้ทำการ แตกzip ไปไว้ที่ folder ที่เข้าง่ายๆของผมเอาไว้ที่ c: 3.ทำการ download ไฟล์ libwebcore.so ได้ที่นี่ http://banpot.srihawong.info/wp-content/uploads/2011/06/libwebcore-patch.zip ไฟล์นี้สำหรับ Motorola charm http:// เท่านั้นนะครับ ห้ามนำไปใช้กับรุ่นอื่น อันนี้เป็นไฟล์ต้นฉบับครับ http://banpot.srihawong.info/wp-content/uploads/2011/06/libwebcore-org.zip ถ้ารุ่นอื่นสามารถหาวิธีแก้ไขไฟล์ libwebcore.so ได้จาก blog นี้เลยครับ 4.เปิด command บนเครื่องคอมพิวเตอร์ขึ้นมาก่อนครับ แล้วพิมพ์คำสั่งตามด้านล่างเลย cd c:\sdk\tools adb devices (เชคก่อนว่าเจอเครื่องเรามั้ย ถ้าเจอจะต้อวพบ ชุดตัวเลขฐาน16 และคำว่า device) adb remount …