Try DigitalOcean

Easily deploy an SSD cloud server on @DigitalOcean in 55 seconds. Sign up using my link and receive $10 in credit: https://www.digitalocean.com/?refcode=abdad7db64b9

Advertisements
Posted in Uncategorized | Leave a comment

Where does the Mac OS X store account pictures?

If you are looking for your account picture, below worked for Mavericks.

ls -l ~/Library/Containers/com.apple.ImageKit.RecentPictureService/Data/Library/Images/Recent\ Pictures/

There are *.png and *.tiff …

Have fun!

Posted in Apple, Mac OS X | Leave a comment

Reset the Dock to default in Mac OS X Mavericks

I just upgrade snow leopard to mavericks and got the ugly dock so I want to reset it to default :p

 

Open terminal and copy both the text below and paste in terminal, then press enter:

defaults delete com.apple.dock 
killall Dock

 

Posted in Apple, Mac OS X | Tagged , | 1 Comment

Install Ubuntu LTS version into your QNAP NAS

Prepare in QNAP NAS QTS GUI:
1).
install optware by Web UI
ssh login as admin
ipkg install binutils
ipkg install coreutils
ipkg install perl
2).
create user backup, HOME Backup by Web UI
3).
ssh login as admin and setting ENV. variables:
cd /share/Backup
mkdir -p chroot; cd chroot
wget -c http://archive.ubuntu.com/ubuntu/pool/main/d/debootstrap/debootstrap_1.0.40~precise2_all.deb
ar -x debootstrap_1.0.40~precise2_all.deb
tar xvf data.tar.gz
vi usr/sbin/debootstrap (DEBOOTSTRAP_DIR=/share/Backup/chroot/usr/share/debootstrap)
export DEBOOTSTRAP_DIR=`pwd`/usr/share/debootstrap
export ARCH=i386 (amd64)
export RELEASE=precise (lucid)
export MIRROR=http://tw.archive.ubuntu.com/ubuntu/
export MIRROR=
4).
./usr/sbin/debootstrap –arch $ARCH –foreign $RELEASE ./$RELEASE\_$ARCH $MIRROR
5).
wget -c http://launchpadlibrarian.net/118258808/qemu-user-static_1.0.50-2012.03-0ubuntu2.1_amd64.deb
ar -x qemu-user-static_1.0.50-2012.03-0ubuntu2.1_amd64.deb
tar xvf data.tar.gz
6).
cp ./usr/bin/qemu-x86_64-static ./$RELEASE\_$ARCH/usr/bin
export DEBOOTSTRAP_DIR=””
LC_ALL=C LANGUAGE=C LANG=C chroot $RELEASE\_$ARCH /debootstrap/debootstrap –second-stage
7).
LC_ALL=C LANGUAGE=C LANG=C chroot $RELEASE\_$ARCH dpkg –configure -a
8).
wget –no-check-certificate https://help.ubuntu.com/lts/sample/sources.list

cp $RELEASE\_$ARCH/etc/apt/sources.list $RELEASE\_$ARCH/etc/apt/sources.list.orig
cp sources.list $RELEASE\_$ARCH/etc/apt/sources.list
9).
LC_ALL=C LANGUAGE=C LANG=C chroot $RELEASE\_$ARCH /bin/bash -c “apt-get update; apt-get install vim sudo gnupg -y; apt-get update; locale-gen en_US.UTF-8; echo “Asia/Taipei” > /etc/timezone; dpkg-reconfigure -f noninteractive tzdata”
10).
LC_ALL=C LANGUAGE=C LANG=C chroot $RELEASE\_$ARCH apt-key adv –keyserver keyserver.ubuntu.com –recv-keys 3E5C1192
11).
LC_ALL=C LANGUAGE=C LANG=C chroot $RELEASE\_$ARCH apt-get update

chroot $RELEASE\_$ARCH /bin/bash

HAPPY HACKING …

APPEND – Useful scripts:
1).
====mountall.sh====
cat > mountall.sh << EOF
#!/bin/bash

if [ -z $1 ]; then
CHROOT_PATH=ubuntu
else
CHROOT_PATH=$1
fi

DROOT=`pwd`/$CHROOT_PATH

mount -t proc proc $DROOT/proc
mount –bind /dev $DROOT/dev
mount -t sysfs sysfs $DROOT/sys
mount –bind /dev/pts $DROOT/dev/pts
EOF
=================
2).
====first.sh====
chroot ubutu /bin/bash
apt-get update
apt-get install vim sudo gnupg -y
apt-get updatelocale-gen en_US.UTF-8
echo "Asia/Taipei" > /etc/timezone
dpkg-reconfigure -f noninteractive tzdata
exit
=============

Posted in Linux, NAS, QNAP, Ubuntu | Tagged , | 5 Comments

AOSP JB 4.2.2 r1

Binaries for Nexus Devices
https://developers.google.com/android/nexus/drivers

In AOSP, the build number for Android 4.2.2 is JDQ39 and its tag is android-4.2.2_r1.
https://android.googlesource.com/platform/build/+/android-4.2.2_r1

etc.

Posted in Uncategorized | Tagged | Leave a comment

Goodbye OpenFeint

Notice: OpenFeint Servers to Shutdown on December 14th

R. I. P. OpenFeint

Update 2017/09/14 – https://github.com/OpenKit

Posted in Uncategorized | Tagged | Leave a comment

Mac OS X add static route

command:
sudo route add subnet/netmask gateway

e.g.
sudo route add 10.0.0.0/8 172.20.100.254

Posted in Uncategorized | Leave a comment