IT Tips

You are currently browsing the articles from KomKid.Net matching the category IT Tips.

Export/Import Google Chrome Extensions

เคยมั้ยที่ มีเหตุจำเป็นต้องเปลี่ยน User หรือปัญหาอื่น ๆ ที่ทำให้ต้องใช้งาน Chrome ใหม่ แต่ไม่มี Extension ที่ถูกใจตามมาด้วย
ปัญหานี้แก้ไขได้ด้วยการ Export แล้วนำมา Import ใหม่ดังนี้
1. Extensions ของ Google Chrome จะเก็บอยู่ที่ /home/user/.config/google-chrome/Default/Extensions สำหรับ Ubuntu และ C:\Documents and Settings\UserName\Local Settings\Application Data\Google\Chrome\User Data\Default สำหรับ Windows
แต่จะเห็นว่ามันไม่ได้เก็บเป็นชื่อ Extensions แต่เป็นรหัสอะไรซักอย่าง

2.ใช้คำสั่งเพื่อดูรายละเอียดของ Extensions ดังนี้
2.1 เปิดหน้า Extensions ขึ้นมา chrome://extensions/
2.2 กดปุ่ม shift+ctrl+j
2.3 ป้อน code ดังนี้

1
returnExtensionsData=function(a){var o=[];for(var i=0,e=a.extensions,len=a.extensions.length;i<len;i++){o.push({id:e[i].id,name:e[i].name});}console.log('var extdata='+JSON.stringify(o)+';');};requestExtensionsData();

2.4 จะได้ผลลัพธ์ประมาณนี้

1
2
3
4
var extdata=[
{"id":"dabddpakolmhhlcblnooeacilidlbblh","name":"Publish sync for google+ & facebook"},
{"id":"lnlgojabfogikedjanecphloghlegpdm","name":"Phone 2 Google Chrome™"},
{"id":"oadboiipflhobonjjffjbfekfjcgkhco","name":"Google Chrome to Phone Extension"}];

3.จากขั้นตอนที่ผ่านมาจะเห็นว่า id จะตรงกับชื่อ folder ที่นี้ก็ดูตรง name ซึ่งเป็นชื่อ Extension ก็ไป copy folder นั้นมา แล้วก็คลิกตรง “Load unpacked extension… แล้ว browse ไป folder ที่เรา copy มา ก็เป็นอันเสร็จเรียบร้อย

ที่มา : http://superuser.com/questions/154770/how-to-export-extensions-of-google-chrome

Written by Komkid on January 23rd, 2012 with no comments.
Read more articles on IT Tips and JavaScript and Software.

Ubuntu with RAM 4GB

ใช้งาน Ubuntu โดยที่มี RAM 2 GB มานาน วันดีคืนดีซื้อมาเพิ่มอีก 2 GB แทนที่จะเห็นเป็น 4 GB ดันเห็นแค่ 2.7 GB เอง
พอลองเปิด Windows7 ดูบ้างก็เห็นเป็น 4 GB (Available 2.7 GB) เหมือนกัน
พอค้นคว้าดูก็พบว่าเป็นข้อจำกัดของ OS 32 bit นี่เอง แต่สำหรับ Ubuntu มีทางแก้ไขคือ เปิดใช้งาน Physical Address Extension :P AE

1. ตรวจสอบก่อนว่า CPU เรา support มั้ย

1
grep --color=always -i PAE /proc/cpuinfo

ถ้าได้ผลก็ดำเนินการต่อได้

2. ติดตั้ง Kernel สำหรับใช้งาน PAE

1
sudo aptitude install linux-generic-pae linux-headers-generic-pae

ที่มา : https://help.ubuntu.com/community/EnablingPAE

Written by Komkid on January 23rd, 2012 with no comments.
Read more articles on IT Tips and Ubuntu.

Ubuntu : Internet Sharing

#nano /etc/network/interfaces

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet dhcp

auto eth1
iface eth1 inet static
address 192.168.1.10
network 192.168.1.0
netmask 255.255.255.0
broadcast 192.168.1.255
post-up /usr/local/bin/iptable.sh

#nano /usr/local/bin/iptable.sh

#!/bin/bash
echo 1 > /proc/sys/net/ipv4/ip_forward
iptables -F
iptables -t nat -F
iptables -t mangle -F
iptables -X
iptables -P FORWARD ACCEPT
iptables -t nat -A PREROUTING -i eth0 -p tcp –dport 80 -j REDIRECT –to-port 8080
iptables -t nat -A POSTROUTING -o eth1 -j MASQUERADE

#apt-get install squid3
#nano /etc/squid3/squid.conf

http_port 8080 transparent
acl localnet src 192.168.1.0/24
http_access allow localnet
http_access deny all

#apt-get install dnsmasq
#nano /etc/dnsmasq.conf

interface=eth1
dhcp-range=192.168.1.11,192.168.1.20,12h

script : share-net-script

Written by Komkid on July 7th, 2011 with no comments.
Read more articles on Internet and IT Tips and Ubuntu.

Ubuntu : Shutter add-ons

อ้าว Shutter (โปรแกรมสำหรับ capture screen) ทำไม capture แล้ว edit ไม่ได้หว่า
search ดูถึงได้รู้ว่า ขาด add-ons บางอย่างไปนี่เอง ว่าแล้วก็ติดตั้งซะเลย

1
2
apt-get install libgoo-canvas-perl
apt-get install gnome-web-photo

อันแรกเอาไว้ capture แล้ว edit ได้
อันที่สองเอาไว้ capture หน้า web page ยาว ๆ มันจะ scroll ให้อัตโนมัติ

Written by Komkid on October 20th, 2010 with no comments.
Read more articles on IT Tips and Software and Ubuntu.

Expanding the size of a virtual disk

เมื่อ OS ใน Virtual Box เต็ม จะทำอย่างไรกันดีเล่าพี่น้อง
ความจริงวิธีที่จะทำ มันไม่ตรงกับหัวข้อครับ เพราะมันไม่ใช่การขยาย แต่มันเป็นการสร้างใหม่
1.เลือก VDI Image เป้าหมายที่ต้องการขยาย

2.สร้าง VDI Image อันใหม่ให้มีขนาดที่ต้องการ
3.เพิ่ม Image อันใหม่เป็น Slave และ เพิ่ม linux Image เข้าไปใน CD สำหรับใช้ Boot ตามตัวอย่างใช้ Parted Magic

4.เปิด terminal พิมพ์ nano /proc/paritions เพื่อดูขนาด harddisk

5.ใช้คำสั่ง dd โดยสังเกตขนาดตามรูป จะโอนจาก 10G(hda) ไปเป็น 30G(hdb) ก็ใช้คำสั่ง

1
dd if=/dev/hda of=/dev/hdb

6.รอจนเสร็จแล้ว shutdown
7.สร้าง OS อันใหม่ แล้วเพิ่ม VDI Image อันใหม่ กับ image ของ Parted Magic boot อีกทีเพื่อ resize partition เพราะ image ใหม่มีขนาด 30 GB ก็จริง แต่ขนาด partition ยังเท่าเดิม

8.เสร็จแล้วก็ shutdown แล้วเอา image ของ Parted Magic ออกก็จะได้ OS ใหม่ใหญ่กว่าเดิมไว้ใช้งาน

Written by Komkid on July 22nd, 2010 with no comments.
Read more articles on Admin and IT Tips and Software and Ubuntu.

« Older articles

No newer articles