-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
-rw-r--r-- 864B Jul 28, 2011 · A8C1296 · ~1 min

PUT problems after upgrading CouchDB to 1.1.0

couchdb траблы

Today we upgraded CouchDB on the production server to 1.1.0. Ran into a problem — PUT requests didn’t work, returning a strange error:

[error] => unknown_error
[reason] => function_clause

I.e. we couldn’t update a single document in the database, while POST requests for creating new documents worked just fine.

It turned out that when upgrading CouchDB from an older version to 1.1.0 there are two versions of some module left in the system (it might affect several modules) — the old one and the new one. These two versions conflict with each other.

The fix was simple, although a bit weird. You need to find where the *.beam files are stored on the system (in our case it’s /opt/couchdb), delete them (if you’re nervous, you can move them aside), then go back to the CouchDB source folder and run again:

make install
[↵] open page problemy-s-put-pri-obnovlenii-couchdb-do-110.md
-rw-r--r-- 2.5K Jul 14, 2011 · DF5FB8F · ~3 min

Streaming audio on Mac OS X

nicecast online вещание интернет радио mac os x

Streaming audio on Mac OS X

It just so happens that in my room the speakers are on one side and the computer on the other. Running a cable from the speakers doesn’t feel like a sane idea. So — there are speakers, wi-fi, and a wi-fi-capable mobile device (in my case an iPad, but anything that can play music over wi-fi will do). I remembered that there’s a great tool called Nicecast — with one click you can set up an online broadcast. The point: stay at my desk and control the music there, but have it play on the speakers across the room. Some will say running a cable is easier, but… fuck yeah, why not over-engineer it?

[↵] open page potokovoe-veshanie-zvuka-na-max-os-x.md
-rw-r--r-- 2.0K Jul 14, 2011 · 35BB245 · ~2 min

A few FCKEditor settings

fckeditor полезное

A few FCKEditor settings

A note to self — for quickly setting up FCKeditor. It’s outdated and the developers are working on CKEditor instead, but CKEditor doesn’t have a free file manager, while FCKEditor does.

So this is a quick reference for getting FCKEditor up and running.

[↵] open page para-nastroek-fckeditor.md
-rw-r--r-- 5.4K Jul 13, 2011 · 7912FD1 · ~5 min

Resizing animated GIF images with Imagick

php imagick programming скрипты полезное

At work I ran into the need to process animated GIF avatars. The source images can be of any size, and they need to be downsized to a target size with cropping to a square. Below the cut — how we solved it.

[↵] open page resize-animirovannih-gif-izobrazheniy-s-imagick.md
-rw-r--r-- 434B May 13, 2011 · 2C445DF · ~1 min

Simple online TimeStamp converter

php javascript timestamp unix скрипты полезное

At work I occasionally have to look at some data from the database. Times we mostly store as TimeStamp (the number of seconds since the dawn of the Unix world — 1 January 1970).

A number like 1305233826 tells you nothing about what date it is. Writing the conversion in some script every time gets tedious, so I made an online converter. It shows the time in a human-readable form.

Enjoy. Online TimeStamp Converter

[↵] open page prostoy-online-timestamp-converter.md
makoni@arm1:~/blog$ cd ../page-36/ // ← previous