7xment
I am Networker
Tuesday, October 12, 2010
Delete Facebook
หากใครมีสงสัยว่าจะลบ facebook ได้ยังไง(How to permanently delete your facebook account.) ให้ คลิกที่ลิงก์นี้
ป้ายกำกับ:
DeleteFacebook
Saturday, September 4, 2010
ติดตั้ง apache php mysql และ phpmyadmin ใน ubuntu
- sudo apt-get install apache2
- sudo apt-get install php5
หลังจากจบข้อ 1 และ 2 พื้นที่ในการเก็บเว็บจะอยู่ที่ /var/www/ - sudo apt-get install libapache2-mod-php5
ลองทดสอบโดยพิมพ์ - sudo apt-get install mysql-server
- sudo apt-get install php5-mysql
- sudo apt-get install phpmyadmin
เข้าถึง phpmyadmin ได้ที่ http://localhost/phpmyadmin/
แหล่งความรู้ http://www.howtogeek.com/howto/ubuntu/i
Tuesday, August 24, 2010
python กับ gui
เนื่องจากนับจากตอนเป็นเด็กๆใครๆก็บอกให้เริ่มเขียนโปรแกรมก็บอกภาษา c ไอเราก็ไม่เชื่อ ไปหัดเอา php ก่อนปรากฎมันเขียนง่ายสบายจริงๆ ยิ่งใช้ dreamweaver ช่วยแล้วแหม ดีเป็นไหนๆ ประกอบกับเวลาใช้งานคอมพิวเตอร์โปรแกรมที่เป็น text mode ทำงานใน command line นี้ไม่ค่อยเคยใช้เลย ทำให้เวลาต้องมาเขียนโปรแกรม python ที่ต้องทำงาน ใน command line แล้วไปไม่เป็น คำว่าไปไม่เป็นไม่ได้แปลว่ามันยากนะ มันก็เหมือนๆกัน แต่แบบนึกไม่ออกว่าจะให้หน้านี้แล้วเปลี่ยนไปอีกหน้ามันทำยังไง ออกแบบ interface มันไม่ถูก ก็เลยลองหาข้อมูลเกี่ยวกับ python ที่ทำงานแบบ gui ได้ซึ่งไปเจอเอา blog นี้ของพี่โบเขาเรื่อง GUI with Python อ่านแล้วก็ถูกใจ ลองทำตามแล้วมันใช่ เลยอยากให้ทุกคนลองดู
โดยการเขียน gui ให้ python นั้นเดิมทำไม่ได้คือมี python ลงเฉยๆเขียนออกมาแล้วจะเป็นโปรแกรมทำงานใน command line ถ้าอยากให้มี gui ต้องใช้โมดูลที่ชื่อว่า wxPython ช่วยจะมีรูปแบบคำสั่งต่างๆ โดยถ้าอยากหัดให้มีข้อมูลให้ดูเพียบที่ ซึ่งมีประโยชน์มาก แต่มันยากเกินไปสำหรับคนอย่างผม สำหรับคนอย่างผมที่ใช้ microsoft มาตั้งแต่เกิดจึงอยากได้โปรแกรมที่คลิกลากวาง ซึ่งมันก็มีจัดให้ชื่อว่า wxGlade ซึ่งเป็นโปรแกรมที่ดีเหมือนกันมีจุดเล็กๆน้อยๆที่งงอยู่ แต่ก็ต้องบอกว่า หัดกันได้
หลายคนอาจสงสัย มึงเกลิ่นตั้งนานนี้จะสอนไหมต้องบอกตามตรงเลยว่า ไม่สอนครับ 555+ เพราะผมเล็งเห็นแล้วว่าถ้าผมทำเองไม่ดีเท่าที่มีคนทำไว้แล้วครับ ผมจึงมาบอกเล่าดีกว่าว่าแหล่งเรียน wxGlade ในไทยมี
1)http://angsila.cs.buu.ac.th/~48035757/wxGlade/
2)http://www.combiolaw.de/blog/424/
หมดแล้วครับ เว็บนอกก็อยู่ในข้อมูลที่ให้ไว้เว็บเดียวก็ได้ข้อมูลเยอะมาก
โดยการเขียน gui ให้ python นั้นเดิมทำไม่ได้คือมี python ลงเฉยๆเขียนออกมาแล้วจะเป็นโปรแกรมทำงานใน command line ถ้าอยากให้มี gui ต้องใช้โมดูลที่ชื่อว่า wxPython ช่วยจะมีรูปแบบคำสั่งต่างๆ โดยถ้าอยากหัดให้มีข้อมูลให้ดูเพียบที่ ซึ่งมีประโยชน์มาก แต่มันยากเกินไปสำหรับคนอย่างผม สำหรับคนอย่างผมที่ใช้ microsoft มาตั้งแต่เกิดจึงอยากได้โปรแกรมที่คลิกลากวาง ซึ่งมันก็มีจัดให้ชื่อว่า wxGlade ซึ่งเป็นโปรแกรมที่ดีเหมือนกันมีจุดเล็กๆน้อยๆที่งงอยู่ แต่ก็ต้องบอกว่า หัดกันได้
หลายคนอาจสงสัย มึงเกลิ่นตั้งนานนี้จะสอนไหมต้องบอกตามตรงเลยว่า ไม่สอนครับ 555+ เพราะผมเล็งเห็นแล้วว่าถ้าผมทำเองไม่ดีเท่าที่มีคนทำไว้แล้วครับ ผมจึงมาบอกเล่าดีกว่าว่าแหล่งเรียน wxGlade ในไทยมี
1)http://angsila.cs.buu.ac.th/~48035757/wxGlade/
2)http://www.combiolaw.de/blog/424/
หมดแล้วครับ เว็บนอกก็อยู่ในข้อมูลที่ให้ไว้เว็บเดียวก็ได้ข้อมูลเยอะมาก
Sunday, August 22, 2010
เขียน python ตอน 1
ภาษา python เป็นภาษาที่ง่ายมาก
--ถ้าเราอยากเขียนเลียนแบบภาษา c ที่จะ run คำสั่งที่ฟังก์ชั่น main ก่อนก็ทำยังงี้ครับ
#!/usr/bin/python
def main():
print "This is main function"
if __name__ == "__main__" : main()
ก็จะ run โค้ดที่ mainก่อน
--comment ของภาษา python มี แบบเดียวคือ comment บรรทัดต่อบรรทัด โดยใช้ # นำหน้าคำสั่งต่างๆ
--การกำหนดคำสั่งต่างเหมือนเดิมคือ ตัวแปรอยู่ฝั่งซ้าย ค่าอยู่ฝั่งขวา กำหนดค่าด้วย เครื่องหมาย =
--ตัวอย่างการเขียนคำสั่งเงื่อนไข
#!/usr/bin/python
def main():
a,b = 0,1
if a < b :
print "a less than b"
elif a > b :
print "a more than b"
else :
print "a equal b"
if __name__ == "__main__" : main()
ตัวอย่างการสร้าง function และ เรียกใช้งานฟังก์ชั่น
#!/usr/bin/python
def main():
show_value()
def show_value():
for i in range(10):
print i
if __name__ == "__main__" : main()
ตัวอย่างการสร้าง class
#!/usr/bin/python
class employeesalary :
def __init__(self,employee=10000) :
self.employee=employee
def newemployee(self) :
self.employee=9000
def main():
somsak = employeesalary()
print somsak.employee
somsri = employeesalary()
somsri.newemployee()
print somsri.employee
if __name__ == "__main__" : main()
สงสัยตรงไหนถามมา
--ถ้าเราอยากเขียนเลียนแบบภาษา c ที่จะ run คำสั่งที่ฟังก์ชั่น main ก่อนก็ทำยังงี้ครับ
#!/usr/bin/python
def main():
print "This is main function"
if __name__ == "__main__" : main()
ก็จะ run โค้ดที่ mainก่อน
--comment ของภาษา python มี แบบเดียวคือ comment บรรทัดต่อบรรทัด โดยใช้ # นำหน้าคำสั่งต่างๆ
--การกำหนดคำสั่งต่างเหมือนเดิมคือ ตัวแปรอยู่ฝั่งซ้าย ค่าอยู่ฝั่งขวา กำหนดค่าด้วย เครื่องหมาย =
--ตัวอย่างการเขียนคำสั่งเงื่อนไข
#!/usr/bin/python
def main():
a,b = 0,1
if a < b :
print "a less than b"
elif a > b :
print "a more than b"
else :
print "a equal b"
if __name__ == "__main__" : main()
ตัวอย่างการสร้าง function และ เรียกใช้งานฟังก์ชั่น
#!/usr/bin/python
def main():
show_value()
def show_value():
for i in range(10):
print i
if __name__ == "__main__" : main()
ตัวอย่างการสร้าง class
#!/usr/bin/python
class employeesalary :
def __init__(self,employee=10000) :
self.employee=employee
def newemployee(self) :
self.employee=9000
def main():
somsak = employeesalary()
print somsak.employee
somsri = employeesalary()
somsri.newemployee()
print somsri.employee
if __name__ == "__main__" : main()
สงสัยตรงไหนถามมา
ป้ายกำกับ:
python
Wednesday, July 21, 2010
อยากเขียน c# บน linux
ต้องใช้ mono สามารถเขียน c# บน linux ได้แต่ interface ต้องใช้ เป็น gtk นะ
sudo apt-get install monodevelop
sudo apt-get install monodevelop
ป้ายกำกับ:
C#
Monday, July 12, 2010
แลป lanwan ตอน 1 Router configuration
เอกสารอ้างอิงที่นี่
สรุป
สรุป
- สั่ง enable เพื่อเข้าสู่ privilegrd mode ซึ่งจะเปลี่ยนจากเครื่องหมาย >เป็น #
- startup-config เพื่อตรวจสอบไฟล์ startup
- เข้าสู่ Global configuration โดยการพิมพ์ config terminal หรือ configure terminal ผลที่เปลี่ยนจะคือ Router#จะเป็น Router(config)#
- พิมพ์ router rip จะเปลี่ยนจาก Router(config)#เป็น Router(config-router)#
- ถ้าจะเข้าไป config interface ต้องออกจากโหมด router ก่อนโดยพิมพ์exit ต้องอยู่ใน genaral config ก่อนแล้วพิมพ์ interface serial 0/0 เพื่อ config serial โหมดจะเปลี่ยนเป็น Router(config-if)#
- ตั้งชื่อ router โดยให้อยู่ในโหมด general config แล้วพิมพ์ hostname ชื่อ ให้ลองพิมพ์ hostname GAD จะกลายเป็น GAD(config)#
- จะตั้ง password ในโหมด user exec mode
ให้เข้าไปที่ general config โดยเข้าที่ line console โดยพิมพ์ line console 0 เพื่อเข้าสู่ config-line แล้วพิมพ์ password ตามด้วยชื่อ password - ถ้า password telnet ให้เข้าเป็น line vty 0 แล้ว password เหมือนข้อ 7
- ถ้าจะตั้งค่า privileged mode ให้อยู่ที่ genaral config แล้วตั้งค่า enable password ตามด้วยค่า
- ตั้ง secret password โดยให้อยู่ที่ general config แล้วตั้งค่า enable secret ตามด้วยค่า
- อยากรู้คำสั่งพิมพ์ ?
- sh run หรือ show running-config
Friday, July 9, 2010
How to install and use Keygen in Linux
******************************************************
Installation Type:
-bundle (Bundled installer)
-For: All Debian based distros (Ubuntu, Kubuntu, Mint, CrunchBang, etc)
---How To Install-------------------
-bundle
-Open a terminal and 'cd' to the directory containing the .bundle file
-Run: sudo chmod +x Yourgram.bundle
-Run: sudo ./Yourgram.bundle
-Follow the onscreen instructions to install
---How To Use Keygen----------------
-Open a terminal and 'cd' to the directory containing the keygen
-Run: sudo chmod +x YourKeyGen
-Run: ./YourKeyGen
Installation Type:
-bundle (Bundled installer)
-For: All Debian based distros (Ubuntu, Kubuntu, Mint, CrunchBang, etc)
---How To Install-------------------
-bundle
-Open a terminal and 'cd' to the directory containing the .bundle file
-Run: sudo chmod +x Yourgram.bundle
-Run: sudo ./Yourgram.bundle
-Follow the onscreen instructions to install
---How To Use Keygen----------------
-Open a terminal and 'cd' to the directory containing the keygen
-Run: sudo chmod +x YourKeyGen
-Run: ./YourKeyGen
ป้ายกำกับ:
Ubuntu
Sunday, June 27, 2010
Wireshark Lab : HTTP
1.เปิด BROWSER
2.เปิด Wireshark Capture แล้วกำหนด Filter แค่ http เพราะ Packet ที่ตรวจจับได้จะมีหลาย Protocol เราต้องการวิเคราะห์ที่ http ตามภาพข้างล่าง กด Apply

3.ลองเปิดหน้านี้ http://gaia.cs.umass.edu/wireshark-labs/HTTP-wireshark-file1.html
4.แล้วลองหยุดจับ Packet จะได้ผลดังนี้
คำถาม
1. HTTP ที่ใช้เป็นเวอร์ชั่น 1.0 หรือ 1.1
ตอบ HTTP/1.1
2. ภาษาที่ใช้ได้
ตอบ สังเกตตรง Accept-language:th-TH
3. IP ADDRESS ของต้นทางและปลายทาง
ตอบ ต้นทาง คือ 192.168.1.33 ปลายทางคือ 128.119.245.12
4. Status code ที่รับได้คือ
ตอบ 200 OK
5. Last Modified เมื่อไรไหร่
ตอบ Last-Modified: Sun, 27 Jun 2010 05:51:01 GMT\r\n
6. ความยาวของเนื้อหาที่รับได้
ตอบ Content-Length: 128\r\n
7. ในเนื้อหาจะไม่ปรากฏข้อมูลภายใน Packet ที่รับมาได้เป็นคนละส่วนกันเลย
ป้ายกำกับ:
wireshark lab
Subscribe to:
Posts (Atom)

