20081125
20081120
20081118
Convert plist binary to xml, back and forth.
plutil -convert xml1 some_file.plistplutil -convert binary1 some_other_file.plist
To check, use file something.plist
Leopard Re Installation: Part 2
I reformat using the same filesystem my external hard drive uses. Then set UID to 1000 in the System Preferences > Accounts > Advanced Options (right click on username). After that chown whole home directory.
Leopard Re Installation: Backup & Restore Issue
I wanted to replace my OS X Server because of lack of Internet Sharing feature. So I do both Time Machine backup and manual backup before making a fresh OS X installation. These are the issue that I faced.
Restoring using Time Machine right after Leopard Installation is not as I expected. There will be folders like 'System (from old mac)', 'Applications (from old mac)'. For me, this is not neat.
Your OSX filesystem must have the same format as your Time Machine backup filesystem. I'm using HFS Journaled with Case Sensitive, but my external hard disk is using HFS Journaled NOT with Case Sensitive. I have to reformat either my OS X partition, or my external hard disk.
Restoring files from Time Machine is strict because of UID. My user uses 501 as UID but my last Server system was using 1000 as UID. So restoring could get complicated.
Right now I'm going to change my UID and reboot and see what will happen.
Restoring using Time Machine right after Leopard Installation is not as I expected. There will be folders like 'System (from old mac)', 'Applications (from old mac)'. For me, this is not neat.
Your OSX filesystem must have the same format as your Time Machine backup filesystem. I'm using HFS Journaled with Case Sensitive, but my external hard disk is using HFS Journaled NOT with Case Sensitive. I have to reformat either my OS X partition, or my external hard disk.
Restoring files from Time Machine is strict because of UID. My user uses 501 as UID but my last Server system was using 1000 as UID. So restoring could get complicated.
Right now I'm going to change my UID and reboot and see what will happen.
20080927
Phone Number Fix on iPhone (localization)
Problem is iPhone doesn't recognize callers. Although they exist in the address book, iPhone only show their number with extra country code prefix.
Replace PhoneNumberTemplates.plist
in the /System/Library/PrivateFrameworks/AppSupport.framework
*Best to just backup/rename than to remove.
Replace PhoneNumberTemplates.plist
in the /System/Library/PrivateFrameworks/AppSupport.framework
*Best to just backup/rename than to remove.
Custom Ringtones on iPhone
Convert audio file to use AAC codec and change the extension to m4r. Must not exceed 40 seconds.
Fix Youtube on iPhone
Unzip unlock.zip
to /private/var/root/Library/Lockdown and remove pair_records folder.
*Best to just backup/rename than to remove.
to /private/var/root/Library/Lockdown and remove pair_records folder.
*Best to just backup/rename than to remove.
20080917
Shell Auto-completion
I feel it is too late for me to realize that auto-completion using ESCAPE ESCAPE is actually came from a shell variable, $EDITOR
Few servers gave me hard times on stty important function. So I:
EDITOR=`which vi`; export EDITORFew servers gave me hard times on stty important function. So I:
echo "stty erase ^H
stty kill ^U
stty intr ^C
TERM=vt100
EDITOR=`which vi`
export TERM EDITOR" >> ~/.profile
20080910
Use putty to access vnc using ssh tunnel
This is to overcome firewall which filter connection on the application layer. In putty:
On vnc, connect to
Hostname: ssh_server
X display location: localhost:0
Source port: 5901
Destination: vnc_server:5900On vnc, connect to
localhost:1
20080822
16:06 < codept> is there any tool to ...like ...present logs in the /var/log
...in more simpler format, let say httpd-access.log, a tool
that can analyze it and gives number of connection for each
unique source, ...that is just an idea
16:10 < geek00l> codept, we call it - awk, sed, sort, uniq, grep and fuck
...in more simpler format, let say httpd-access.log, a tool
that can analyze it and gives number of connection for each
unique source, ...that is just an idea
16:10 < geek00l> codept, we call it - awk, sed, sort, uniq, grep and fuck
20080813
Be Gentle With Your Keyboard
I just learn that, (after years of facing terminal), the more you minimize your typing mistakes, lesser the potential of screwing up or end up your work dissatisfied. It helps me thinking better too.
Think before you type. Think again before you press enter. Avoid typing too fast (because there are kids who think typing fast shows that they're good). Type slow not too slow, sit back and relax. Enjoy the cleanliness of your terminal output.
p/s: Yeah, I've worked with business critical environment... and I did screw up a few times :-p And this came to my mind while I was watching a 'really good' but not sys admin guy, typing neatly.
Think before you type. Think again before you press enter. Avoid typing too fast (because there are kids who think typing fast shows that they're good). Type slow not too slow, sit back and relax. Enjoy the cleanliness of your terminal output.
p/s: Yeah, I've worked with business critical environment... and I did screw up a few times :-p And this came to my mind while I was watching a 'really good' but not sys admin guy, typing neatly.
20080812
Start postgresql, create database and access it
Platform:FreeBSD
Install: using ports
Binary location:
Don't forget to modify
# su - pgsql
$ initdb -D /usr/local/pgsql/data (if only doesn't exist)
$ postgres -D /usr/local/pgsql/data >logfile 2>&1 &
$ createdb test
$ psql testInstall: using ports
Binary location:
/usr/local/binDon't forget to modify
rc.conf
20080807
httpd.conf | php module
20080725
Diriwayatkan dari Abu Hurairah r.a., ia berkata: Rasulullah bersabda:“Wanita dinikahi karena empat perkara; karena hartanya, karena kedudukannya/ keturunannya, karena kecantikannya dan keranan agamanya. Maka, pilihlah yang baik agamanya niscaya engkau beruntung.” (Diriwayatkan oleh al-Bukhari (3/242), Muslim (2/1086), Abu Dawud (2047), an—Nasaa’i (6/6 8) dan Ibnu Majah (1858))
20080720
Failed to enable the 'httpready' Accept Filter
[bambino@bambino ~]$ sudo apachectl start
[Mon Jul 21 14:42:39 2008] [warn] (2)No such file or directory: Failed to enable the 'httpready' Accept Filter
[bambino@bambino ~]$ sudo kldload accf_http
[bambino@bambino ~]$ sudo apachectl restart
[bambino@bambino ~]$
20080719
streamyx settings for ADSL wireless router
- enter correct username and password
- vpi : 0 (zaro or 8 if you want)
- vci : 35
using command line mail
Simply mail to recipient,
$
Enter subject, press enter, and type mail content. Ctrl + D to finish.
To include content from a text file, for example, msg.txt, simply enter ~r ./msg.txt at the first line of the mail content.
$
To list mail headers in inbox
$
To list mail saved msg headers in mailbox (~/mbox)
$
Inside mail console (don't really know what to call exactly), you can use h to list again mail headers, and enter any number to read specific mail.
$
mail RECIPIENTEnter subject, press enter, and type mail content. Ctrl + D to finish.
To include content from a text file, for example, msg.txt, simply enter ~r ./msg.txt at the first line of the mail content.
$
mail RECIPIENT -c CCPERSONTo list mail headers in inbox
$
mail -HTo list mail saved msg headers in mailbox (~/mbox)
$
mail -FInside mail console (don't really know what to call exactly), you can use h to list again mail headers, and enter any number to read specific mail.
Subscribe to:
Posts (Atom)