mount dmg ใน ubuntu

หาตาม net
dmg2iso example.dmg example.img
sudo mkdir /media/example
sudo modprobe hfsplus
sudo mount -t hfsplus -o loop example.img /media/example

แต่ของเราไม่ work
dmg2iso example.dmg example.img
sudo losetup -o 36864 /dev/loop0 example.img
จะ mount หรือ เปิดใน nautilus ก็ได้

ก่อนได้ modprobe hfsplus และลงพวก HFS ไปหลายตัวไม่รู้ว่ามีผลหรือเปล่า

ลง app ต่าง version ใน macosx

จะลง xcode_4.0.2_and_ios_sdk_4.3.dmg มัน require 10.6.6 มี 10.6.4 แต่ไม่อยาก upgrade

แก้ไข /System/Library/CoreServices/SystemVersion.plist



build weinre osx draft

# require /usr/bin/cc (xcode)
cd
git clone https://github.com/mxcl/homebrew.git
cd homebrew/bin
# add PATH
export PATH=${PATH}:${HOME}/homebrew/bin
# install nodejs
brew install node
export NODE_PATH=${HOME}/homebrew/lib/node_modules:/usr/local/lib/node
# install npm
curl http://npmjs.org/install.sh | sh
export PATH=${PATH}:/usr/local/share/npm/bin
npm install express
git clone https://github.com/callback/callback-weinre.git
cd callback-weinre/weinre.build
cp sample.personal.properties personal.properties
# install growlNotify
GrowlNotify 1.3
ant -f get-vendor.xml
ant


http://shapeshed.com/journal/setting-up-nodejs-and-npm-on-mac-osx/
http://growl.info/downloads
http://phonegap.github.com/weinre/

xcode 3.2.5 phonegap 1.1 error NSEC_PER_MSEC


error: 'NSEC_PER_MSEC' undeclared (first use in this function)


แก้ไขให้ define ที่ PhoneGapLib/Classes/Capture.m

#ifdef NSEC_PER_MSEC
#undef NSEC_PER_MSEC
#endif
#define NSEC_PER_MSEC 1000000ull

setup D-link DIR-615 revision E4 with firmware 5.10 to dd-wrt

step for update firmware dir-615 e4 to dd-wrt v24sp2

Basically, what you need to do is to check what is the hardwareID of the E4. How to do it is by looking at the original D-Link firmware from the D-Link Taiwan website (only the D-Link Taiwan website has the E4 firmware at the moment). Download and open the original D-Link firmware (download links are below) and open it using a HEX editor (i use ghex2). Scroll down all the way to the bottom of the file and you will see the hardwareID (it should read AP99-AR7240-RT-091105-01). Now, compare the hardwareID of the original D-Link firmware (DIR615E3_E4_FW510B09.bin) with the DD-WRT firmware (dir615e4-factory-to-ddwrt-firmware.bin). Edit the DD-WRT firmware to have the same hardwareID of the original D-Link firmware. For me, i only had to change the last digit from 5 to 1.

find hex editor for edit firmware dir615e4-factory-to-ddwrt-firmware.bin
sudo aptitude install ghex

download ver 5.1 form dlink
http://wrpd.dlink.com.tw/router/firmware/DIR-615/Ex/Default/DIR615E3_E4_FW510B09.bin
download v24sp2 from dd-wrt
http://dd-wrt.com/routerdb/de/download/D-Link/DIR-615/E4/dir615e4-factory-to-ddwrt-firmware.bin/3835

ok i edit only
"AP99-AR7240-RT-091105-05" to "AP99-AR7240-RT-091105-01"

connect to dir-615 via cable > 192.168.1.1
set user : admin
password :

Status > Wireless > Site survey > choose Primary Router
save & applysetting
then auto switch to
Wireless > Basic Settings > Wireless Mode : Client > Save > check the Wireless Network Name (SSID) is your Primary Router
> save & applysetting

set security parameter for connect to Primary Router.
i use wep for old Primary Router.
Wireless > Wireless Security > 

Security Mode : WEP
Authentication Type : Open
Default Transmit Key : 1
Encryption : 64 bits 10 hex digits
Key 1 : xxxxxxxxxx
> save & applysetting

Setup > Basic Setup > Network Setup
192.168.1.2
255.255.255.0
192.168.1.1
192.168.1.1

> save & reboot

DD-WRT Forum :: View topic - D-link DIR-615 revision E4 with firmware 5.10:

Pessimistic Locking With Grails

STATE YOUR BIZNESS: Pessimistic Locking With Grails:

'via Blog this'

Oracle XE เพิ่ม Database Processes

sqlplus / as sysdba
SQL> show parameters processes
SQL> alter system set processes=200 scope=spfile;

วันนี้ dropbox ไม่ sync

มี message ให้สั่ง command

echo 100000|sudo tee /proc/sys/fs/inotify/max_user_watches

config ให้ grails ดึง database lib postgresql จาก maven repository

vi BuildConfig.groovy

uncomment mavenCentral() ใน repositories

add runtime 'postgresql:postgresql:8.4-702.jdbc4' ใน dependencies

http://alexduan.com/2011/02/17/managing-dependencies-in-your-grails-project/

driver oracle
http://www.oracle.com/technetwork/database/features/jdbc/index-091264.html
config 'com.oracle:ojdbc14:10.2.0.4.0' ไม่ผ่าน

oracle xe thai 8 bit

sqlplus / as sysdba

CREATE USER xxx IDENTIFIED BY pppp DEFAULT TABLESPACE users;
GRANT CONNECT, RESOURCE TO xxx;
GRANT privilege TO xxx;

GRANT DBA TO xxx;


SHUTDOWN IMMEDIATE;
STARTUP MOUNT;
ALTER SYSTEM ENABLE RESTRICTED SESSION;
ALTER DATABASE OPEN;
ALTER DATABASE CHARACTER SET INTERNAL_USE TH8TISASCII;
SHUTDOWN;
STARTUP;

ทำ reverse
SHUTDOWN IMMEDIATE;
STARTUP MOUNT;
ALTER SYSTEM ENABLE RESTRICTED SESSION;
ALTER DATABASE OPEN;
ALTER DATABASE CHARACTER SET INTERNAL_USE AL32UTF8;
SHUTDOWN;
STARTUP;


http://www.narisa.com/forums/index.php?showtopic=13641

birt xml datasource ref Project Path in Eclipse

script : beforeOpen Data Source

xml = params['xml'];
java.lang.System.out.println(xml);
file = org.eclipse.core.resources.ResourcesPlugin.getWorkspace().getRoot().getProject("PROJECT").getFolder("XML_PATH").getFile(xml).getLocation();
this.setExtensionProperty("FILELIST", file);

php ต่อ ingres

http://en.kioskea.net/faq/923-connecting-to-an-ingres-database-with-php
http://www.php.net/manual/en/function.ingres-connect.php

$objConnect = ingres_connect("demodb","ingres","password");
if($objConnect)
{
echo "Database Connected.";
}
else
{
echo "Database Connect Failed.";
}

mssql_close($objConnect);

เปลี่ยน password root ของ mysql ubuntu

sudo dpkg-reconfigure mysql-server-5.1

Configuring Windows 200/XP to authenticate with Samba

Configuring Windows 200/XP to authenticate with Samba (plain text password)

Registry setting to enable Windows XP/2000 to authenticate against Samba with plain text passwords.

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanWorkStation\Parameters]
"EnablePlainTextPassword"=dword:00000001

iPhone dev resource

http://developer.apple.com/
http://www.stanford.edu/class/cs193p/cgi-bin/drupal/
http://www.lynda.com/home/DisplayCourse.aspx?lpk2=48369 (ทอเรส..น)
http://www.icodeblog.com/

http://www.macfeteria.com/tutorial/

RadioGroup isDirty problem

Ext.override(Ext.form.RadioGroup, {
isDirty: function(){
//override the behaviour to check sub items.
if (this.disabled || !this.rendered) {
return false;
}
var dirty = false;
if (this.getValue().getRawValue() != this.originalValue.getRawValue()) {
dirty = true;
}
return dirty;
}
});


http://www.sencha.com/forum/showthread.php?98647-DUPE-865-RadioGroup-isDirty-bug
http://www.sencha.com/forum/showthread.php?97057-isDirty-on-radiogroup

ทำสี
http://www.chami.com/colorizer/

trac svn apache2

Server setup

Install subversion

$ sudo apt-get install subversion

Install apache with subversion module:

$ sudo apt-get install apache2 libapache2-svn
$ sudo /etc/init.d/apache2 restart

Edit the dav stuff:

$ sudo gedit /etc/apache2/mods-available/dav_svn.conf


DAV svn
SVNPath /var/lib/svn

AuthType Basic
AuthName "Subversion Repository"
AuthUserFile /etc/apache2/dav_svn.passwd

Require valid-user
#AuthzSVNAccessFile /etc/apache2/svn-acl


Place the files from subversion:

$ cd /var/lib
$ sudo chown -R www-data svn/

Creating the passwordfile:

$ sudo htpasswd -c /etc/apache2/dav_svn.passwd first-svn-user

Adding more users with:

$ sudo htpasswd /etc/apache2/dav_svn.passwd more-user

Restart the webserver:

$ sudo /etc/init.d/apache2 restart

Subversion can now be found at: http://localhost/svn/

Trac enviroment

$ sudo apt-get install trac
Password:

Create the containing directory with it's files (our trac project is called "horus")

$ sudo mkdir /var/lib/trac
$ sudo chown -R www-data /var/lib/trac/
$ cd /var/lib/trac/
$ sudo trac-admin horus initenv

This will generate the following output:

Creating a new Trac environment at /var/lib/trac/horus



Trac will first ask a few questions about your environment

in order to initialize and prepare the project database.



Please enter the name of your project.

This name will be used in page titles and descriptions.



Project Name [My Project]> Horus



Please specify the connection string for the database to use.

By default, a local SQLite database is created in the environment

directory. It is also possible to use an already existing

PostgreSQL database (check the Trac documentation for the exact

connection string syntax).



Database connection string [sqlite:db/trac.db]>



Please specify the type of version control system,

By default, it will be svn.



If you don't want to use Trac with version control integration,

choose the default here and don't specify a repository directory.

in the next question.



Repository type [svn]>



Please specify the absolute path to the version control

repository, or leave it blank to use Trac without a repository.

You can also set the repository location later.



Path to repository [/path/to/repos]> /var/lib/svn



Creating and Initializing Project




---------------------------------------------------------------------

Project environment for 'Horus' created.



You may now configure the environment by editing the file:



/var/lib/trac/horus/conf/trac.ini



If you'd like to take this new project environment for a test drive,

try running the Trac standalone web server `tracd`:



tracd --port 8000 /var/lib/trac/horus



Then point your browser to http://localhost:8000/horus.

There you can also browse the documentation for your installed

version of Trac, including information on further setup (such as

deploying Trac to a real web server).



The latest documentation can also always be found on the project

website:



http://trac.edgewall.org/



Congratulations!

Change the owner and do a testrun with the webuser (test at http://localhost:8000/horus):

$ sudo chown -R www-data horus
$ sudo -u www-data tracd --port 8000 /var/lib/trac/horus

^C$

Trac in Apache 2

Create the location

$ sudo gedit /etc/apache2/sites-available/trac

#set up Trac handling
SetHandler mod_python
PythonHandler trac.web.modpython_frontend
PythonOption TracEnvParentDir /var/lib/trac
PythonOption TracUriRoot /trac

# Use the SVN password file.
AuthType Basic
AuthName "Subversion Repository"
AuthUserFile /etc/apache2/dav_svn.passwd
Require valid-user


Install the python module and make the site available

$ sudo apt-get install libapache2-mod-python
$ sudo a2ensite trac
$ sudo apache2ctl restart

location can be reached at: http://localhost/trac/



https://help.ubuntu.com/community/UbuntuTracHowto#Localhost%20setup

tail: cannot watch `/var/log/messages': No space left on device

$ tail -f /var/log/messages
...
...
tail: cannot watch `/var/log/messages': No space left on device
$ df -i
Filesystem Inodes IUsed IFree IUse% Mounted on
/dev/sda3 0 0 0 - /

$ sudo su
# sysctl fs.inotify.max_user_watches
fs.inotify.max_user_watches = 8192
#
# sysctl -w fs.inotify.max_user_watches=16384
fs.inotify.max_user_watches = 16384
# exit
$ tail -f /var/log/messages

ok


http://forums.gentoo.org/viewtopic-t-806326-start-0.html

NullPointerException "Refreshing external folders"

เปิด file .project ขึ้นมาดูก็จะรู้คำตอบ
.metadata/.plugins/org.eclipse.jdt.core/.org.eclipse.jdt.core.external.folders/.project

น่าจะมี path ไหนถูกลบทิ้งไปบ้าง

internal browser error in eclipse XPCOM

แก้ไข eclipse.ini
-Dorg.eclipse.swt.browser.XULRunnerPath=/usr/lib/xulrunner-VERSION


โดย VERSION ตรวจสอบจาก ls /usr/lib/xulrunner แล้ะกด tab แล้วดู path ที่ลง

ถ้าไม่มีก็ลงผ่าน aptitude ก่อน

sudo aptitude search xulrunner

หาที่ มีคำอธิบายประมาณ
XUL + XPCOM application runner

ตอนนี้ก็ xulrunner-1.9.2 ใน ubuntu 10.10

ลง shell editor ใน eclipse

download ShellEd จาก sourceforge
http://sourceforge.net/projects/shelled/

http://download.eclipse.org/technology/linuxtools/updates-nightly/
ShellEd ต้องการ package จาก linuxtools เพิ่ม repository linuxtools ก่อน install ShellEd

ShellEd ไม่มี update site ลงผ่าน archive ใน add repository