• Shortcuts : 'n' next unread feed - 'p' previous unread feed • Styles : 1 2

» Publishers, Monetize your RSS feeds with FeedShow:  More infos  (Show/Hide Ads)


Date: Tuesday, 14 May 2013 19:13

http://gitref.org/ – přehledná a jednoduchá dokumentace GIT příkazů

 

Author: "Roman Ožana" Tags: "Nezařazené"
Comments Send by mail Print  Save  Delicious 
Date: Tuesday, 14 May 2013 13:18

First write in terminal: which sendmail wlll return path to sendmail app (in my case /usr/sbin/sendmail). Then open php.ini file and setup:

sendmail_path = /usr/sbin/sendmail -t -i

Create necessary folder and setup postfix permissions:

sudo mkdir -p /Library/Server/Mail/Data/spool
sudo /usr/sbin/postfix set-permissions
sudo /usr/sbin/postfix start

And check if emails will come:

php -r "mail('youremail@domain.com', 'subject', 'message', 'From: <youremail@domain.com>' . PHP_EOL);"

#php #email #mac

Author: "Roman Ožana" Tags: "Nezařazené, email, mac, PHP"
Comments Send by mail Print  Save  Delicious 
Date: Friday, 10 May 2013 16:40

Author: "Roman Ožana" Tags: "Nezařazené"
Comments Send by mail Print  Save  Delicious 
Gravity   New window
Date: Friday, 10 May 2013 16:35

Author: "Roman Ožana" Tags: "Nezařazené"
Comments Send by mail Print  Save  Delicious 
OSCILATE   New window
Date: Tuesday, 07 May 2013 18:06

Author: "Roman Ožana" Tags: "Nezařazené"
Comments Send by mail Print  Save  Delicious 
Date: Monday, 06 May 2013 10:56

Instalace Pear

cd /usr/local
sudo curl http://pear.php.net/go-pear.phar -o go-pear.phar
sudo php go-pear.phar

V mnoha případech bude potřeba přidat cestu k pear do ~/.bash_profile pomocí příkazu: export PATH=/opt/local/bin:$PATH. Pro ověření instalace stačí spustit which pear výslekdem by měla být cesta k binárce pear /opt/local/bin/pear. Nezapomeňte po sobě uklidit sudo rm go-pear.phar.

Ověřte, zda máte správně nastavenu include path:

php -r 'echo get_include_path() . PHP_EOL;' # overeni nastaveni include path

Ostatní kontroly jsou popsány zde: http://pear.php.net/manual/hu/installation.checking.php

Instalace Codesniffer

sudo pear install PHP_CodeSniffer

Code sniffer binárku phpcs najdete ve svém domovském adresáři cd ~/pear/bin/

sudo ./phpcs -i # zobrazi nainstalovane standardy

Vlastní code sniffer standardy postačí nakopírovat do složky ~/pear/share/pear/PHP/CodeSniffer/Standards

sudo ./phpcs --config-set default_standard Zend

Instalace PHPUnit

sudo pear config-set auto_discover 1; sudo pear install pear.phpunit.de/PHPUnit
pear info phpunit/PHPUnit # vypsani informaci o balicku

#php #phpunit #pear #mac #codesniffer

Author: "Roman Ožana" Tags: "Nezařazené, codesniffer, mac, pear, PH..."
Comments Send by mail Print  Save  Delicious 
R.I.P.D.   New window
Date: Tuesday, 23 Apr 2013 16:30

Author: "Roman Ožana" Tags: "Nezařazené"
Comments Send by mail Print  Save  Delicious 
Date: Wednesday, 17 Apr 2013 08:09

Star Trek Into Darkness Official Trailer #3

U nás 6. června 2013 – http://www.startrekmovie.com

Author: "Roman Ožana" Tags: "Nezařazené"
Comments Send by mail Print  Save  Delicious 
Date: Tuesday, 16 Apr 2013 14:31

Getting user by field name is easy, #Wordpress have function for that get_user_by. Getting user by his metadata is a little bit complicated. You can found on the Internet some complex procedures how to get user by metadata using WP_Query object. Forget about them!

You need prepare correct meta query as array or string and call get_users. Thats all!

/**
 * Get user by his metadata
 * @author Roman Ozana <ozana@omdesign.cz>
 * @param $meta_key
 * @param $meta_value
 * @return mixed
 */
function get_user_by_meta($meta_key, $meta_value) {
 return reset(
  get_users(
   array(
    'meta_key' => $meta_key,
    'meta_value' => $meta_value,
    'number' => 1,
    'count_total' => false
   )
  )
 );
}

#wordpress #user #meta

Author: "Roman Ožana" Tags: "Nezařazené, meta, user, wordpress"
Comments Send by mail Print  Save  Delicious 
Date: Monday, 08 Apr 2013 07:06

Úžasné záběry pořízené díky novému stabilizátoru MōVI

Author: "Roman Ožana" Tags: "Nezařazené"
Comments Send by mail Print  Save  Delicious 
Date: Wednesday, 27 Mar 2013 20:58
@media only screen and (-webkit-min-device-pixel-ratio: 2),(min-resolution: 192dpi) {
  /* it's retina yeah! */
}

#css #retina #howto

Author: "Roman Ožana" Tags: "Nezařazené, CSS, howto, retina"
Comments Send by mail Print  Save  Delicious 
Date: Tuesday, 26 Mar 2013 08:47

Run Automator and create new Application. Add task Run Shell script and paste follow code:

STATUS=`defaults read com.apple.finder AppleShowAllFiles`
if [ $STATUS == YES ]; 
then
    defaults write com.apple.finder AppleShowAllFiles NO
else
    defaults write com.apple.finder AppleShowAllFiles YES
fi
killall Finder

Save application. From now can Tooggle

#mac #shell #osx #automator

Author: "Roman Ožana" Tags: "Nezařazené, automator, mac, osx, shell"
Comments Send by mail Print  Save  Delicious 
Date: Friday, 22 Mar 2013 11:49

Add follow code to main less file:

#responsive {
  .debug(@text) {
    body:before {
      background: yellowgreen;
      display: block;
      padding: 5px;
      text-align: center;
      content: @text;
    }
  }
}

I have separate css rules for madia max-width:767 screen in file  responsive-767.less. This file is inserted to main less by following line:

@import "src-less/responsive-767"(max-width: 767px);

On the first line of responsive-767.less is

#responsive > .debug('Landscape phone to portrait tablet (max-width: 767px)');

On the page with max-width 767 will show on top green debug banner:

less-debug-mixin

There is generated CSS code:

@media (max-width:767px){body:before{background:yellowgreen;display:block;padding:5px;text-align:center;content:'Landscape phone to portrait tablet (max-width: 767px)';}

#lesscss #less #debug #css #en

Author: "Roman Ožana" Tags: "Nezařazené, CSS, debug, en, less, less..."
Comments Send by mail Print  Save  Delicious 
Date: Monday, 11 Mar 2013 08:25

It’s simple: df -h
#mac #terminal

Author: "Roman Ožana" Tags: "Nezařazené, mac, terminal"
Comments Send by mail Print  Save  Delicious 
Date: Tuesday, 05 Mar 2013 10:15

There is simple way how to install Composer on Mac OS

sudo curl -s http://getcomposer.org/installer | php && mv ./composer.phar /usr/local/bin/composer

Now you can run composer from command line anywhere! Including self-update:

sudo composer self-update

#mac #composer #php #en

Author: "Roman Ožana" Tags: "Nezařazené, composer, en, mac, PHP"
Comments Send by mail Print  Save  Delicious 
Date: Tuesday, 26 Feb 2013 19:41

The new version of Twitter API 1.1 wrongly requires OAuth for oEmbed part of API. I found the discussion of this problem in #Wordpress trac and one very encouraging response from Andrew Nacin:

Andrew Nacin: Initial response from Twitter is that “the endpoint will continue to operate unauthenticated, as-is the spirit of oEmbed.” Still trying to confirm whether that means 1.0′s oEmbed endpoint will remain in operation past the 1.0 shutdown, if 1.1′s oEmbed endpoint will be changed to be entirely unauthenticated, or both. Either way, we’re in the clear in terms of not needing to implement something new.

#API #Twitter #Wordpress

Author: "Roman Ožana" Tags: "Nezařazené, API, twitter, wordpress"
Comments Send by mail Print  Save  Delicious 
Date: Wednesday, 20 Feb 2013 11:26

Constants for expressing human-readable intervals in new #Wordpress are very useful:

define( 'MINUTE_IN_SECONDS', 60 );
define( 'HOUR_IN_SECONDS',   60 * MINUTE_IN_SECONDS );
define( 'DAY_IN_SECONDS',    24 * HOUR_IN_SECONDS   );
define( 'WEEK_IN_SECONDS',    7 * DAY_IN_SECONDS    );
define( 'YEAR_IN_SECONDS',  365 * DAY_IN_SECONDS    );

Example:

wp_cache_add($key, $data, 'default, 5 * DAY_IN_SECONDS);
Author: "Roman Ožana" Tags: "Nezařazené, wordpress"
Comments Send by mail Print  Save  Delicious 
Date: Friday, 08 Feb 2013 16:30

WordPress using a lot globals variables. These variables are used throughout WordPress code for various reasons. Great example is database connection object wpdb. Here is common example how to use wpdb in some function:

function something() { 
 global $wpdb;
 /** @var wpdb $wpdb */
 $wpdb->query('SQL...');
}

It’s highly uncomfortable and long! Therefore, I have prepared a simple object which make all global variables much more accesible from anywhere: https://gist.github.com/OzzyCzech/4737518 (PHP 5.3+ only)

function something() { 
 Globals::wpdb()->query('SQL...');
}

#wordpress #hack #php #en

Author: "Roman Ožana" Tags: "Nezařazené, en, hack, PHP, wordpress"
Comments Send by mail Print  Save  Delicious 
Date: Thursday, 31 Jan 2013 17:35
open /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone\ Simulator.app/

#mac #iphone #xcode #en

Author: "Roman Ožana" Tags: "Nezařazené, en, iPhone, mac, xcode"
Comments Send by mail Print  Save  Delicious 
Date: Wednesday, 30 Jan 2013 16:00

Mé vylepšení spočívá v úpravě výpis chyby Assert . To je doplněno o konkrétní řádek PHP kódu, na kterém test spadl.

Nette Tester (v0.9)
-------------------
PHP 5.3.20 | '/opt/local/bin/php' -c '/opt/local/var/db/php5' -c '/opt/local/etc/php5'

..F

-- FAILED: /Users/roman/workspace/web/tests/settings.phpt | web/tests/settings.phpt
   code : \Tester\Assert::true(false);
   Failed asserting that FALSE is TRUE
   in Tester/Framework/Assert.php(210)
   in Tester/Framework/Assert.php(88)
   in web/tests/settings.phpt(9)

Úpravu najdete zde: https://gist.github.com/4671280

#PHP #Nette #Tester #NetteTester

Author: "Roman Ožana" Tags: "Nezařazené, Nette, NetteTester, PHP, t..."
Comments Send by mail Print  Save  Delicious 
Next page
» You can also retrieve older items : Read
» © All content and copyrights belong to their respective authors.«
» © FeedShow - Online RSS Feeds Reader