Dzīvokļa iegāde

Beidzot saņēmos un sakonfigurēju github lapu dzīvokļa remonta blogam. Dzīvoklī remonts tiek veikts jau kādu laiku, bet sāksim visu no sākuma.

Īss ievads .. Šā gada sākumā skatījāmies, ka apstākļi izveidojušies pietiekami labi, lai varētu sākt domāt par savu dzīvokli. Sākumā, protams, domas bija par māju, bet ņemot vērā visus apstākļus (māju cenas Valmierā:), pagaidām nosliecāmies par labu dzīvoklim. Vairāku mēnešu garumā aktīvi pētījām ss.lv sludinājumus, vairākus aizgājām apskatīt, bet tā īsti neviens nepatika. Vienam platība maza, citam logi savdabīgi augstu, vienā dzīvoklī bija mazas istabas, liela vannas istaba un 3 balkoni. Hmm.. Pagāja daudzi mēneši līdz atradām piemērotu 4-istabu dzīvokli, pieņemamā cenā, bet remontējamu. Pēc lielas prātošanas, par to vai gaidīt vēl citu variantu, vai ņemt ciet to pašu un sākt ar remontu, izlēmām, ka pēc remonta dzīvoklis būs tāds kā mēs gribam, cerams krietni labāks par tādu, kas remontēts tieši pārdošanai.

Tālāk sekoja visu dokumentu kārtošana. Dzīvokli, protams, ņēmām kredītā, tāpēc jau iepriekš biju apstaigājis +/- visas bankas un zināju ko kur man piedāvā. Par katru apmeklēto banku īsumā:

  • DNB - tajā laikā "defaultā" banka, kredītu piedāvāja, bet toreiz neapmierināja …
more ...

PHP error handling

You can learn new stuff each day, for example we have just recently turned php errors into exceptions. It is so good, that I decided even to write about it here. Currently we do this only on development environment for safety, because the page code is quite old. Anyways, every php development should do this to get rid of php's annoying error reporting and hopefully make a better product. So enough talking, here is the code:

https://gist.github.com/3790196

more ...

PHP/Code Editors

In general I need two main features from the code editor. (I will not talk about obvious ones like unicode and unix/win/osx line ending support, fast, good UI, etc) And those are: sftp browser and just a good editor.

Nobody seems to ever get it right.

TextMate seems to be fast, but lacks sftp support. Same for sublime (which is also just weird editor). Same for Kod. Same for lots of them.

Then there are editors with bunch of features, but are so terribly slow or lacks design so much or just can't seem to get some of the features right. For example eclipse and all its crazy movement. Or komodo with its seems-to-be-unfinished sftp panel.

Then there are few those that shine out like Espresso and Coda. They are not bad at all, but for example Espresso is kind of slow on my computer and I can't get used to its sftp browser. On the other hand Coda is nicely made and is full of features, but I don't really use them all so from my point …

more ...

Carrots

These are from my parents garden..

Img_0006 Img_0008 [See the full gallery on Posterous]5

more ...





Email php errors

This has been very useful code for me, so I thought I would share it, maybe somebody else also find it useful:

// Register handlers
set_error_handler('custom_error_handler', E_ALL);
set_exception_handler('custom_exception_handler');
register_shutdown_function('send_php_errors');

// Array containing errors
$php_errors = array();


// Error handling function
function custom_error_handler($errno, $errstr)
{
  global $php_errors;
  $php_errors[] = func_get_args();
  return FALSE;
}


// Exception handling function
function custom_exception_handler($exception)
{
  global $php_errors;
  $php_errors[] = (array)$exception;
}


// Send php errors on shutdown
function send_php_errors()
{
  global $php_errors;
  if (!empty($php_errors))
  {
    mail('Place your e-mail here', '!!! PHP error !!!', print_r($php_errors, TRUE), "Content-Type: text/plain; charset=utf-8");
  }
}
more ...