-rw-r--r-- 9.7K Oct 28, 2013 · 8B6E9EA · ~8 min

Impressions of Windows Phone 8

windows phone 8 nokia

Lumia 625

I have been using the Lumia 625 for 4 days now. I finally got to know Windows Phone 8 up close. It turned out to be much nicer than I thought.

[↵] open page vpechatleniya-ot-windows-phone-8.md
-rw-r--r-- 452B Oct 7, 2013 · 0400D23 · ~1 min

Syncing a Folder Located Elsewhere with Yandex.Disk

яндекс.диск шпаргалки

For now Yandex.Disk only syncs files and folders located inside its own folder and does not let you add a folder from elsewhere, for example from another hard drive. If you do not want to place the folder you need to sync inside the Yandex.Disk folder, on macOS you can create a symlink, for example:

ln -s /Volumes/MyDisk/FolderToSync /Users/user/Яндекс.Диск/FolderToSync

On Windows, in theory, you can use a symbolic link as well.

[↵] open page sinhronizatsiya-papki-s-yandeks-diskom-nahodyashchejsya-v-drugom-meste.md
-rw-r--r-- 752B Sep 30, 2013 · 2F52096 · ~1 min

Hackintosh Cheat Sheet

шпаргалки хакинтош

I will keep notes here on what to do about various Hackintosh issues. For now this applies to 10.8.5.

kernel extensions in backtrace org.apple.driver.applertc(1.5)
install "AppleACPIPlatform rollback" from Multibeast

If the USB mouse and USB keyboard do not work when the system boots, oddly enough it is related to audio. Delete HDAEnabler1.kext from /System/Library/Extentions and install the audio drivers via Multibeast (in my case ALC887 with DSTD, current).

You can delete the file either in single-user mode (boot with the -s key) or by connecting over remote desktop.

When upgrading to Mavericks, in Multibeast version 6 GraphicsEnabler=No is the default, so you get a black screen after boot. It needs to be set to Yes.

[↵] open page shpargalka-po-hakintoshu.md
-rw-r--r-- 3.4K Aug 6, 2013 · CC5BDE7 · ~3 min

One Evening with Rostelecom Mobile Service

ростелеком сотовая связь

Rostelecom SIM card

On August 1 Rostelecom launched mobile service in St. Petersburg. Today I bought a SIM card to play around with.

[↵] open page odin-vecher-s-sotovoj-svyaz-yu-ot-rostelekom.md
-rw-r--r-- 3.2K Jul 29, 2013 · 340F65A · ~2 min

Website Tile on the Windows 8 Start Screen

internet explorer windows 8 html

Windows 8 Pinned Site

In Windows 8 there is an option in the tile interface to pin a shortcut to the Start screen as a tile.

[↵] open page plitka-sajta-na-startovom-ekrane-windows-8.md
-rw-r--r-- 1.6K Jul 26, 2013 · C82D830 · ~2 min

Detecting Photo Orientation in PHP via EXIF

php шпаргалки

Cheat sheet.

Vertical photos shot in portrait mode on Android and iPhone are saved as horizontal images, but the photo orientation is written into EXIF.

If you output the value of this command:

$exif = exif_read_data( $existingFilePath, 0, true);

Then among the array values you will see:

array
(
...
    [IFD0] => Array
    (
        [Make] => Sony
        [Model] => LT25i
        [Orientation] => 6
        [XResolution] => 72/1
        [YResolution] => 72/1
        [ResolutionUnit] => 2
        [Software] => 9.1.A.1.145_58_f100
        [DateTime] => 2013:07:26 17:00:01
        [YCbCrPositioning] => 1
        [Exif_IFD_Pointer] => 214
        [GPS_IFD_Pointer] => 626
    )
...
)

In this case it means that when this photo is displayed, the app showing it must rotate the image by 90 degrees because the photo is in portrait orientation.

To avoid problems when uploading images to the server and processing them (creating a reduced copy, creating a thumbnail), you can detect such photos with this code:

<?php
imagecopyresampled( $resultImage, $sourceImage, 0, 0, 0, 0, $new_width, $new_height, $width, $height );

$exif = exif_read_data( $existingFilePath, 0, true);
if( false === empty( $exif['IFD0']['Orientation'] ) ) {
    switch( $exif['IFD0']['Orientation'] ) {
        case 8:
            $resultImage = imagerotate( $resultImage, 90, 0 );
            break;
        case 3:
            $resultImage = imagerotate( $resultImage,180,0);
            break;
        case 6:
            $resultImage = imagerotate( $resultImage,-90,0);
            break;
    }
}

Interestingly, Windows Phone saves a portrait photo as a vertical image.

[↵] open page opredelenie-orientatsii-foto-na-php-cherez-exif.md
-rw-r--r-- 618B Jul 24, 2013 · DC4F445 · ~1 min

Creating SSH Aliases for Terminal in Mac OS X

шпаргалки ssh macos

Cheat sheet.

Everything is the same as in Linux, only on macOS there is no ssh-copy-id command. To make it available:

brew install ssh-copy-id

Further it is exactly like in Linux:

To connect to host 192.168.1.2 not via ssh root@192.168.1.2 but via ssh myhost, do the following:

Create the ~/.ssh/config file, and put this in it:

Host myhost
HostName 192.168.1.2
User root
Port 22

Next, to avoid entering the password every time, generate your keys

ssh-keygen -t rsa 

And copy the public key to the server

ssh-copy-id myhost

Update the keys:

ssh-add ~/.ssh/id_rsa
[↵] open page sozdanie-ssh-aliasov-dlya-terminala-v-mac-os-x.md
makoni@arm1:~/blog$ cd ../page-21/ // ← previous cd ./page-23/ // more posts →