Erhan is typing…

WebDevelopment , PHP, Javascript, CakePHP, ExtJS

Bye Bye Wordpress

| Comments

WordPress served well but I am sick of trying to keep it up to date without writing a single line for years. It is absurd to create pages dynamically when there is no dynamic part at all. Octopress is a perfect solution to build a blog if you are familiar enough with terminal and markdown, no need to be a ninja.

I hope this is new era for my blogging career :p

Bitbucket Repo Sync Application

| Comments

I always shift+delete or rm -rf my old project files and keep my workspace very clean. Let’s say it’s a bad habit after working with SVN for several years and relying on server backups. Oh yes, I am not keeping backups of my projects and so comfortable with it!

Bitbucket is cool with unlimited private repos but the downtime they had yesterday proved that you shouldn’t rely on it if you don’t have copies of your repositories on your own disk. I wrote a small console application using symfony console component to sync all repositories of a user by utilizing bitbucket API.

Basically, you give your bitbucket credentials and it clones all your git repositories.

Installation and Usage

1
2
3
4
git clone git@bitbucket.org:eabay/bitbucket-repo-sync.git
cd bitbucket-repo-sync
php composer.phar install
php src/console.php bitbucket:sync username password

You can choose the path of repositories:

1
php src/console.php bitbucket:sync username password -d /some/where

To get help about the command:

1
php src/console.php help bitbucket:sync

The ironic part is that project is hosted at bitbucket. I think I should define another remote like github. :)

Notice that repositories are cloned over https schema including your username and password. I mean repositories will have origins with uris like https://username:password@bitbucket.org/. If this is a security problem for you, don’t use the application!

TOP10Hardware.com

| Comments

TOP10Hardware.com is a location-based social network which aims to embrace all PC users and hardware enthusiasts all around the world.

Do you want to compare your computer speed with others? How fast is it in the world, continent, country or even in your city? Top10 Hardware makes it possible. It is a Facebook for geeks.

Top10 Hardware is still in beta stage and please help us to make it better by reporting bugs and giving suggestions. Any feedback is welcome.

You can get more information at http://top10hardware.com/en/top10-info

CakePHP Helper for rakaz Combine

| Comments

Combine is still my favorite javascript/css combine and compress script.

I posted a solution how to use it in a CakePHP application and here is a little helper to make it more useful:

app/views/helpers/combine.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<?php
class CombineHelper extends AppHelper
{
  public $helpers = array('Html', 'Javascript');
  
  private $_pattern = '../combine.php?type=:type&files=:files';
  
  public function js($files)
  {
      echo $this->Javascript->link($this->_format($files));
  }
  
  public function css($files)
  {
      echo $this->Html->css($this->_format($files, 'css'));
  }
  
  private function _format($files = array(), $type = 'javascript')
  {
      return String::insert($this->_pattern, array('type' => $type, 'files' => implode(',', $files)));
  }
}

Add it to controller’s helpers property:

1
2
3
4
<?php
class MyController extends AppController
{
  public $helpers = array('Combine');

And call it by passing an array of file names in your view:

1
2
3
4
5
6
7
8
9
10
11
$combine->js(array(
    'javascript1.js',
    'javascript2.js',
    'javascript3.js'
));

$combine->css(array(
    'stylesheet1.css',
    'stylesheet2.css',
    'stylesheet3.css'
));

Don’t forget to add file extensions!

If you want to add only one file, you don’t have to use combine helper. Directives added to .htaccess file let combine script to compress the file(See related post). Just use $javascript->link('filename').

nurturia.com.tr

| Comments

Çocuklu hayat paylaştıkça güzelleşiyor.

ilgera Akademi projesi kapsamında Bilge Adam’da beraber çalışma fırsatı bulduğum, yazılım geliştirme ve ekip çalışması vizyonuma  çok büyük katkı sağlamış Gökhan Altınören’in startup projesi Nurturia bir süredir beta yayınına devam etmekte.

Çocuklu ailelerin biraraya gelmesini sağlayan sosyal ağ sitesinde tüm aile fotoğraflarını, mesajlarını paylaşabiliyor. Özellikle yeni çocuğu olanların çocuk yetiştirme konusunda daha tecrübeli olanlardan soru cevap vasıtası ile yardım alabildiği site sayesinde çocuğunuzun gelişimi sırasında karşınıza çıkabilecek birçok konu hakkında bilgi alabilirsiniz.

Lenovo 3000 N100 Audio Driver Problem on Windows 7

| Comments

After installing Windows 7, everything was fine except sound. It seems like sound drivers were installed correctly but it wasn’t.

You did try to download drivers from lenovo site and install them but shit(!), software installer says that I have no idea about your operating system.

Here are the instructions (applies Soundmax, no idea about Realtek (Xavi reported it works for Realtek too, thanks Xavi!)):

  1. Don’t worry. :p
  2. Download driver.
  3. Installer will extract the package the path you choose (default is C:\Drivers\WIN\Audio).
  4. Open Device Manager.
  5. Go to Sound, video and game controllers section.
  6. Select currently installed device and right click.
  7. Select Update Driver Software.
  8. Select Browse my computer for driver software.
  9. Select Let me pick from a list of device drivers on my computer.
  10. Click Have Disk button.
  11. Select the location where you have extracted package (#3) and browse <path>i386\Vista folder (amd64 for 64bit).
  12. Select the inf file.
  13. Click Next;

And you are done!