Monday, December 26, 2011

Fedora 16 Virtualizaton setup

yum -y install qemu-kvm libvirt python-virtinst bridge-utils
cat /etc/sysconfig/network-scripts/ifcfg-br0

DEVICE=br0
ONBOOT=yes
TYPE=Bridge
BOOTPROTO=dhcp
STP=on
DELAY=0
NM_CONTROLLED=no


cat /etc/sysconfig/network-scripts/ifcfg-em1
DEVICE=em1
HWADDR=XX:XX:XX:XX:XX:XX
ONBOOT=yes
BRIDGE=br0
TYPE=Ethernet
NM_CONTROLLED=no

systemctl stop NetworkManager.service
systemctl disable NetworkManager.service

chkconfig network on
service network start

reboot

Sunday, April 03, 2011

How to check files ignored in git

git ls-files --ignored --others --exclude-standard

Sunday, March 27, 2011

TP-Link 1043ND with OpenWRT

By default,  wifi was not enabled by the firmware.  Use the following command to enable

ssh -l root 192.168.1.1
inside router

opkg update
opkg install hostapd wpa-supplicant kmod-ath9k

Now you can go to the luci menu > Essentials > Network > wifi to enable and provide password

To enable DDNS

opkg luci-app-ddns


configure it luci menu > Essentials > Dynamic DNS

Saturday, March 05, 2011

run Adobe Photoshop Elements 6 with MacOSX case sensitive filesystem

1. Install to case insensitive OS first and activate it to run
2. create dmg formatted and mounted as case insensitive. Copy files installed to /Applications of the mounted dmg
3. copy files under /Library/Application Support, /Library/Preferences and /Applications/Utilities to target case sensitive OS
4. transfer the dmg created in step 2 above to target OS and mounted there. Run the application from the mounted dmg which will fail
5. download Adobe license fixing dmg from Adobe and run to fix the application in step 4

Friday, May 21, 2010

WebM and VP8 land in Chromium

WebM and VP8 land in Chromium: "A developer preview of WebM, a high-quality, open, freely implementable, and web-optimized video format was announced today. Initial support for WebM, including its video codec VP8 will be checked into Chromium later tonight. You can try it by building Chromium yourself or watch for it in the dev channel build in the coming weeks.

Posted by Jim Bankoski, Engineering Manager and Frank Galligan, Tech Lead
"

Monday, April 19, 2010

Change Snow Leopard NTFS to be Read Write

Copy from Guide: Enable native NTFS Read/Write in Snow Leopard
Rename the original /sbin/mount_ntfs tool:

sudo mv /sbin/mount_ntfs /sbin/mount_ntfs.orig

Create a script like this:

#!/bin/sh
/sbin/mount_ntfs.orig -o rw "$@“

save the script to /sbin/mount_ntfs

sudo chown root:wheel /sbin/mount_ntfs
sudo chmod 755 /sbin/mount_ntfs

Enjoy R/W access to NTFS volumes...

In case you don't like it

sudo mv /sbin/mount_ntfs.orig /sbin/mount_ntfs

and everything is back to R/O.

Friday, April 09, 2010

Move Podcast Producer to different hostname

sudo changeip old_ip new_ip old_hostname new_hostname what somewhat
But still the link to Podcast URL still does not work.

Google Search 'change "Podcast Library URL"' give some insight available at Apple Discussion Forum

The key message copied here:

Check /Library/PodcastProducer/Shared/Server/member_preferences_.plist
There should be entries for server_host, tunnel_agent_host & tunnel_server_host that will need to be updated while PCP2 is shut down, which should handle it.


It works!

Thursday, April 08, 2010

Single Sign-On Unavailable - Mac OS X Snow Leopard Open Directory

Check this out

This can be fixed by running
/usr/sbin/changeip which is an python script

seem I need to change the new hostname and new hostname to be different temporary for the changeip to modify some configuration files to be effective.

Friday, April 02, 2010

Rerun Apple Setup

There are files in /var/db
ls -al .*Done
-rw-r--r--@ 1 root wheel 0 Apr 2 17:34 .AppleSetupDone
-rw-r--r-- 1 root wheel 0 Apr 2 17:33 .AutoBindDone
---------- 1 root wheel 0 Apr 2 09:57 .WOLShutOffDone

Will this help re-run the setup

Thursday, April 01, 2010

Bringing improved support for Adobe Flash Player to Google Chrome

Bringing improved support for Adobe Flash Player to Google Chrome: "Adobe Flash Player is the most widely used web browser plug-in. It enables a wide range of applications and content on the Internet, from games, to video, to enterprise apps.

The traditional browser plug-in model has enabled tremendous innovation on the web, but it also presents challenges for both plug-ins and browsers. The browser plug-in interface is loosely specified, limited in capability and varies across browsers and operating systems. This can lead to incompatibilities, reduction in performance and some security headaches.

That’s why we are working with Adobe, Mozilla and the broader community to help define the next generation browser plug-in API. This new API aims to address the shortcomings of the current browser plug-in model. There is much to do and we’re eager to get started.

As a first step, we’ve begun collaborating with Adobe to improve the Flash Player experience in Google Chrome. Today, we’re making available an initial integration of Flash Player with Chrome in the developer channel. We plan to bring this functionality to all Chrome users as quickly as we can.

We believe this initiative will help our users in the following ways:
  • When users download Chrome, they will also receive the latest version of Adobe Flash Player. There will be no need to install Flash Player separately.
  • Users will automatically receive updates related to Flash Player using Google Chrome’s auto-update mechanism. This eliminates the need to manually download separate updates and reduces the security risk of using outdated versions.
  • With Adobe's help, we plan to further protect users by extending Chrome's “sandbox” to web pages with Flash content.

Improving the traditional browser plug-in model will make it possible for plug-ins to be just as fast, stable, and secure as the browser’s HTML and JavaScript engines. Over time this will enable HTML, Flash, and other plug-ins to be used together more seamlessly in rendering and scripting.

These improvements will encourage innovation in both the HTML and plug-in landscapes, improving the web experience for users and developers alike. To read more about this effort, you can read this post on the Flash Player blog.

Developers can download the Chrome developer channel version with Flash built in here. To enable the built-in version of Flash, run Chrome with the --enable-internal-flash command line flag.

Posted by Linus Upson, VP, Engineering
"

Saturday, March 27, 2010

Gentoo stage3 with Synology

Follow http://dsmg600.info/howto:chroot_gentoo and check

ash shell in Synology seem prevent to call chroot saved in other directory. Copy chroot from the bunzipped stage3 to /bin/ will solve the problem

Sunday, March 21, 2010

vmware-rawdiskCreator - Use entire disk instead of a single partition

Follow this vmware-rawdiskCreator - Use entire disk instead of a single partition

fdisk /dev/disk?
Disk: /dev/disk? geometry: 977/32/63 xxx sectors

/Library/Application\ Support/VMware\ Fusion/vmware-vdiskmanager -c -s xxx -a lsilogic -t 1 rawdisk.vmdk
rm rawdisk-s*.vmdk

edit the only file rawdisk.vmdk and replace the two lines inside

createType="fullDevice"
RW xxx FLAT "/dev/disk?" 0

Seem vmware-rawdiskCreator can do the same
/Library/Application\ Support/Vmware\ Fusion/vmware-rawdiskCreator create /dev/disk? 1 lsilogic

modify lines inside
# Extent description
RW 63 FLAT "s320g-pt.vmdk" 0
RW 409600 FLAT "/dev/disk0s1" 0
RW 624727682 ZERO
RW 5103 ZERO


replace with
RW 625142448 figures FLAT "/dev/disk0" 0

Tuesday, March 02, 2010

stardom NAS gcc and glibc version

GNU C Library stable release version 2.3.5, by Roland McGrath et al.
Copyright (C) 2005 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
Compiled by GNU CC version 3.4.4.
Compiled on a Linux 2.6.11.12-fa0 system on 2005-09-07.
Available extensions:
GNU libio by Per Bothner
crypt add-on version 2.1 by Michael Glad and others
linuxthreads-0.10 by Xavier Leroy
BIND-8.2.3-T5B
libthread_db work sponsored by Alpha Processor Inc
NIS(YP)/NIS+ NSS modules 0.19 by Thorsten Kukuk
For bug reporting instructions, please see:
.

Sunday, February 28, 2010

build Chromium OS and Chrome

Still fail at building chrome from source. Cheat and pull the binary to bundle with the OS and other 300+ pkg into an USB. Let see
Try with gentoo amd64 to build chrome

Saturday, February 13, 2010

Subversion over https for Snow Leopard Server

Instructions from Apple

sudo mkdir -p /Library/Subversion/Repository
mkdir -p /tmp/project/branches
mkdir -p /tmp/project/tags
mkdir -p /tmp/project/trunk
sudo svnadmin create /Library/Subversion/Repository/project1
svn import /tmp/project/ files:///Library/Subversion/Repository/project1 -m "Initial import"
sudo chown -R www:admin /Library/Subversion/Repository
sudo chmod -R ug+rwX,o= /Library/Subversion/Repository
sudo vi /etc/apache2/sites/0001_any_443_.conf

content of 0001_any_443_.conf
DAV svn
SVNParentPath /Library/Subversion/Repository
SVNListParentPath on

Don't enable WebDAV inside Web->Site(443)->Option as suggested by check this out

Monday, January 11, 2010

yum list extras

yum list extras [glob_exp1] [...]
List the packages installed on the system that are not available
in any yum repository listed in the config file.

Thursday, December 31, 2009

Patch sqlite-3.6.21 to import csv with " for string

Below patch against sqlite-3.6.21 should handle
  • "field1",123,abc,...
  • abc,...,"",123,....
  • abc,...,""abc"",.....
.mode csv
.import file table

to skip header in the import
.header on

Index: shell.c
===================================================================
--- shell.c (revision 539)
+++ shell.c (working copy)
@@ -2496,7 +2496,7 @@
sqlite3_stmt *pStmt = NULL; /* A statement */
int nCol; /* Number of columns in the table */
int nByte; /* Number of bytes in an SQL string */
- int i, j; /* Loop counters */
+ int i, j, k; /* Loop counters */
int nSep; /* Number of bytes in p->separator[] */
char *zSql; /* An SQL statement */
char *zLine; /* A single line of input from the file */
@@ -2567,8 +2567,32 @@
char *z;
i = 0;
lineno++;
- azCol[0] = zLine;
+ if (lineno == 1 && p->showHeader == 1)
+ continue;
+ if (p->mode == MODE_Csv && zLine[0] == '"') {
+ k = 1;
+ azCol[0] = zLine+1;
+ } else {
+ k = 0;
+ azCol[0] = zLine;
+ }
for(i=0, z=zLine; *z && *z!='\n' && *z!='\r'; z++){
+ //skip to end of double quote
+ if (p->mode == MODE_Csv && k != 0) {
+ if (i != 0)
+ k = 0;
+ while (z[k]!='"' && z[k]!='\n' && z[k]!='\r')
+ k++;
+ while (z[k]=='"' && z[k]!='\n' && z[k]!='\r')
+ k++;
+ if (z[k]!='"')
+ k--;
+// if (k > 2)
+// fprintf(stderr, "skip to end of \" (%d:%d:%d) %s\n",lineno,i,k,azCol[i]);
+ z[k] = 0;
+ z += k;
+ k = 0;
+ }
if( *z==p->separator[0] && strncmp(z, p->separator, nSep)==0 ){
*z = 0;
i++;
@@ -2577,9 +2601,24 @@
z += nSep-1;
}
}
+ if (p->mode == MODE_Csv && *z == '"') {
+ k=0;
+ azCol[i] = z+1;
+ while(z[k]=='"')
+ k++;
+ if (k == 2)
+ k = 1;
+ z += k-1;
+// if (k > 2)
+// fprintf(stderr, "move to start of \": (%d:%d:%d) %s\n",lineno,i,k,azCol[i]);
+ }
} /* end for */
*z = 0;
if( i+1!=nCol ){
+ fprintf(stderr, "k = %d\n",k);
+ for (k=0;k<=i;k++) {
+ fprintf(stderr, "Column (%d): %s\n",k,azCol[k]);
+ }
fprintf(stderr,
"Error: %s line %d: expected %d columns of data but found %d\n",
zFile, lineno, nCol, i+1);

Friday, December 11, 2009

NFS mounted from Snow Leopard to NAS SL3620-2S-LB2

add resvport, locallocks to Advanced Mount Parameters that come with NFS Mounts in Disk Utility and it is done.