Archive for October 24, 2013

how to find OS X Mavericks InstallESD image file

Mac-OS-X-Mavericks-Logo

how to find OS X Mavericks InstallESD image file

Launch Terminal to show hidden files and relaunch the Finder using this defaults command string:
defaults write com.apple.Finder AppleShowAllFiles TRUE;\killall Finder;\say Files Revealed

Go to the /Applications/ folder to locate the “Install OS X 10.9 Developer Preview.app” file
Right-click and choose “Show Package Contents”, then open “Contents” and open “SharedSupport”
Show Package Contents of Mavericks installer

copy  “InstallESD.dmg”

how to check dovecot version

dovecotLogo
check what release/version is installed.

dovecot --version

exclude sites in squid

 

#1: To exclude your local domain sites / range from cache, use following

1
2
acl local_server dst 192.168.0.0/24 192.168.1.0/24
cache deny local_server

 

#2: If you are using SQUID proxy server and you don’t want to cache few sites , use the following directives,

1
2
acl hotmail dstdomain .hotmail.com
always_direct allow hotmail

mysql: count number of rows in a table

mysql-big2

Which way to count a number of rows should be faster in MySQL?

SELECT COUNT(1) FROM TABLE_NAME

When you COUNT(1) it takes in count column indexes, so it will be the best result. Mysql engine actually stores row count, it doesn’t count all rows each time you try to count all rows.

here is the codes you can use it in a script to echo the count

$counter = mysql_query(“SELECT COUNT(*) AS id FROM table_name”);
$num = mysql_fetch_array($counter);
$count = $num["id"];
echo(“$count”);

mac os x server file sharing not taking parent folder permission

The problem arises when someone other than me makes a folder in this shared directory. No one but the person who made that folder can write into it, not even me as a server admin.

i found this to set the permisions and it worked for me

  1. Click the name of your server in the sidebar under Hardware.
  2. Click the Storage tab and browse for and select a shared folder.
  3. Click the gear icon and select Edit Permissions from the pop-up menu.make sure your permission set correctly and also set permission for group

osx-fs