-rw-r--r-- 290B Aug 29, 2011 · 6D6EADB · ~1 min

Mounting HFS+ partitions on Ubuntu

ubuntu hfs

Needed to mount a drive with the HFS+ file system (the one Mac OS X uses). It’s pretty easy. Ubuntu’s repos have a package called hfsplus.

sudo aptitude install hfsplus
sudo mount -t hfsplus /dev/sdf2 /home/username/folder

To unmount:

sudo umount -t hfsplus /dev/sdb2
[↵] open page podkluchenie-hfs-razdelov-v-ubuntu.md
-rw-r--r-- 1003B Aug 28, 2011 · 6D3A132 · ~1 min

Canon 60D

canon 60d фото

Hooray — got myself a new body, the Canon 60D. I’d been wanting a 7D for a long time, but eventually, thanks to @theproof and a couple of other people, it turned out the 60D has the same internals as the 7D — same processor and same sensor. The 7D just has two processors, which only really affects burst-shooting speed and how many frames in a row it can manage. A few photos taken on the way home, below the cut.

[↵] open page canon-60d.md
-rw-r--r-- 5.1K Aug 23, 2011 · 897ADAD · ~4 min

Working with JSON (parsing) in Objective-C for iOS

ios разработка json twitter

Another post — to help things settle in my own head. About working with JSON in Objective-C, using parsing of tweets from Twitter’s public timeline as an example.

[↵] open page rabota-s-json-parsing-v-objective-c-pri-razrabotke-pod-ios.md
-rw-r--r-- 1015B Aug 22, 2011 · 1F09394 · ~1 min

Trimming the trailing slash in URLs with a 301 redirect

php seo полезное

Why not pin this here — easier to find later, when I need it again. Search engines often treat pages like

arm1.ru/blog/yandex-upal-panika-v-twitter

and

arm1.ru/blog/yandex-upal-panika-v-twitter/

as different pages. So you end up with the same content technically living at two URLs, which isn’t great. Below the cut — code that automatically strips a trailing / via a 301 redirect, so search engines don’t end up with duplicate pages.

<?php

# strip the QUERY_STRING from REQUEST_URI
$uri = $_SERVER['REQUEST_URI'];
if ( false === empty( $_SERVER['QUERY_STRING'] ) )
    $uri = str_replace( '?' . $_SERVER['QUERY_STRING'], '', $uri );
			
# 301 redirect when there is a trailing slash on $uri
if ( substr( $uri, -1 ) == '/' && strlen( $uri ) > 1 ) {
    $queryString = '';
    if ( false === empty( $_SERVER['QUERY_STRING'] ) )
        $queryString = '?' . $_SERVER['QUERY_STRING'];
 
    header( 'Location: ' . substr( $uri, 0, -1 ) . $queryString, true, 301 );
    exit;
}
[↵] open page obrezanie-slesha-v-url-s-301-redirectom.md
-rw-r--r-- 3.5K Aug 16, 2011 · 457C13F · ~3 min

Recap of Apple Developers Community #7 meetup

ios продвижение приложений

Went to Apple Developers Community #7 today. The talks were about marketing iOS apps. Two people effectively presented — a representative from Nevosoft, who seem to crank out games on a conveyor belt, and one indie developer.

[↵] open page resume-vstrechi-apple-developers-community-7.md
-rw-r--r-- 6.9K Aug 15, 2011 · 1827A84 · ~6 min

Posting to Twitter via PHP

php twitter скрипты

Long meant to share my modest set of functions for posting tweets to Twitter. Maybe useful to someone — none of it came to me right away, especially the signature generation. Plus this is my attempt to lock into my head what I’ve learnt and coded. The best way to do that, I think, is to try to explain it to someone else :) Description and code below the cut.

[↵] open page otpravka-soobsheniy-v-twitter-cherez-php.md
makoni@arm1:~/blog$ cd ../page-36/ // ← previous cd ./page-38/ // more posts →