I have got a PFX made with Windows Certificate Services to be installed on Apache. So, using OpenSSL the file (source.pfx) has been converted to Apache compatible format:
Command-Shift-3: Take a screenshot of the screen, and save it as a file on the desktop
Command-Shift-4, then select an area: Take a screenshot of an area and save it as a file on the desktop
Command-Shift-4, then space, then click a window: Take a screenshot of a window and save it as a file on the desktop
Command-Control-Shift-3: Take a screenshot of the screen, and save it to the clipboard
Command-Control-Shift-4, then select an area: Take a screenshot of an area and save it to the clipboard
Command-Control-Shift-4, then space, then click a window: Take a screenshot of a window and save it to the clipboard
In Leopard and later, the following keys can be held down while selecting an area (via Command-Shift-4 or Command-Control-Shift-4):
Space, to lock the size of the selected region and instead move it when the mouse moves
Shift, to resize only one edge of the selected region
Option, to resize the selected region with its center as the anchor point
Formats
Different versions of Mac OS X have different formats for screenshots.
Mac OS X 10.2 (Jaguar): jpg
Mac OS X 10.3 (Panther): pdf
Mac OS X 10.4 (Tiger) and later: png
In Mac OS X 10.4 and later, the default screenshot format can be changed, by opening Terminal (located at /Applications/Utilities/Terminal) and typing in:
defaults write com.apple.screencapture type image_format
killall SystemUIServer
Where image_format is one of jpg, tiff, pdf, png, bmp or pict (among others). If you omit the second line, you will need to log out and in again for the change to take effect.
Grab and Preview
Instead of using the keyboard shortcuts above, screenshots can be taken by using the Grab application included with Mac OS X. It is located at /Applications/Utilities/Grab.
In Mac OS X 10.4, the Preview application can also be used to take screenshots, by using the Grab submenu in the File menu.
From the Terminal
The screencapture command in the Terminal can also be used to capture screenshots, and is useful for scripts. Here is an example.
Here is an article I just read, o-la-la - what a scandal...
The most funny thing it how a simple setting is hidden in the menus :-)
Apple Has Quietly Started Tracking iPhone Users Again, And It's Tricky To Opt Out
Apple's launch of the iPhone 5 in September came with a bunch of new commercials to promote the device.
But Apple didn't shout quite so loud about an enhancement to its new mobile operating system, iOS 6, which also occurred in September: The company has started tracking users so that advertisers can target them again, through a new tracking technology called IFA or IDFA.
Previously, Apple had all but disabled tracking of iPhone users by advertisers when it stopped app developers from utilizing Apple mobile device data via UDID, the unique, permanent, non-deletable serial number that previously identified every Apple device.
For the last few months, iPhone users have enjoyed an unusual environment in which advertisers have been largely unable to track and target them in any meaningful way.
In iOS 6, however, tracking is most definitely back on, and it's more effective than ever, multiple mobile advertising executives familiar with IFA tell us. (Note that Apple doesn't mention IFA in its iOS 6 launch page).
Users can switch off that targeting, but it's tricky, as we discovered a couple of days ago. Although at least iOS 6 users are able to turn off tracking, which they weren't before.
Here's how it works.
IFA or IDFA stands for "identifier for advertisers." It's a random, anonymous number that is assigned to a user and their device. It is temporary and can be blocked, like a cookie.
When you look at an app, or browse the web, your presence generates a call for an ad. The publisher's site that you're looking at then passes the IFA to the ad server. The advertiser is then able to know that a specific iPhone user is looking at a specific publication and can serve an ad targeting that user. IFA becomes particularly useful, for instance, if an ad server notices that a particular IFA is looking at a lot of different car sites. Perhaps that user is interested in buying a new car. They'll likely start seeing a lot of car ads on their iPhone.
More importantly, IFA will allow advertisers to track the user all the way to "conversion" — which for most advertisers consists of an app download. Previously, advertisers had no idea whether their ads actually drove people to download apps or buy things. Now IFA will tell them.
The IFA does not identify you personally — it merely provides a bunch of aggregate audience data that advertisers can target with ads.
Tracking is on by default
The new iPhone operating system comes with three things that make tracking easier for advertisers and reduce the likelihood that you'll opt out.
iOS 6 comes in a default "tracking on" position. You have to affirmatively switch it off if you do not want advertisers to see what you're up to.
The tracking control in iPhone's settings is NOT contained where you might expect it, under the "Privacy" menu. Instead, it's found under "General," then "About," and then the "Advertising" section of the Settings menu.
The tracking control is titled "Limit Ad Tracking," and must be turned to ON, not OFF, in order to work. That's slightly confusing — "ON" means ads are off! — so a large number of people will likely get this wrong.
Those three factors combined mean that a huge proportion of iPhone users are unlikely to ever opt out of tracking.
"It's a really pretty elegant, simple solution," says Mobile Theory CEO Scott Swanson. "The biggest thing we're excited about is that it's on by default, so we expect most people will leave it on."
(His take on IFA's capabilities was confirmed by two other mobile ad execs at rival companies.)
Again, IFA doesn't identify you as a person to advertisers. What it does do, however, is provide advertisers with "a really meaningful inference of behavior," Swanson says. "We haven't had access to that information before."
After upgrading to 10.8.2 I have got a problem with adding a new entry into hosts file: the update was recognised only after system restart. But a more easy solution was just to flash DNS cache! So,
... flushing your DNS cache in Mac OS X is actually really easy, and there are two different commands to use, one for Leopard and for Tiger. Depending on your version of OS X, open your Terminal and follow the appropriate directions below:
Flushing DNS Cache in OS X Lion (10.7) and OS X Mountain Lion (10.8)
Launch Terminal and enter the following command, you will need to enter an administrative password:
sudo killall -HUP mDNSResponder
Note the dscacheutil still exists in 10.7 and 10.8, but the official method to clear out DNS caches is through killing mDNSResponder. You can also find that process running in Activity Monitor.
Flush DNS Cache in Mac OS X 10.5, Mac OS X 10.6
Launch Terminal and issue the following command:
dscacheutil -flushcache
All done, your DNS has been flushed. On a side note, the dscacheutil is interesting in general and worth taking a look at, try the -statistics flag instead for some stats.
Flush your DNS Cache in Mac OS X 10.4 Tiger
Type the following command in the Terminal:
lookupd -flushcache
That’s it - now your DNS settings should be as you intended them to be :-)
So, the task is to get duplicate records from a MySQL database.
The easy way:
SELECT COUNT(*), column1, column2 FROM tablename
GROUP BY column1, column2
HAVING COUNT(*)>1;
More complex case: shows each duplicated row:
It can be done using subquery:
SELECT firstname, lastname, list.address FROM list
INNER JOIN (SELECT address FROM list
GROUP BY address HAVING count(id) > 1) dup ON list.address = dup.address
or with INNER JOIN:
SELECT a.firstname, a.lastname, a.address
FROM list a
INNER JOIN list b ON a.address = b.address
WHERE a.id <> b.id
If the same 'address' exist more than two times, then DISTINCT is needed.