This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
echo "hello world" | |
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<p><?= $somevar ?></p> | |
<?php if (count($data) > 0): ?> | |
<ul> | |
<?php foreach($data as $row):?> | |
<li><?= $row ?></li> | |
<?php endforeach;?> | |
</ul> | |
<?php endif; ?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cat ~/.bash_history |awk '{ print $1 }'|sort|uniq -c|sort -rn|head |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# From http://ubuntuforums.org/showpost.php?p=4124372&postcount=5 | |
mencoder -idx out.ogv -ovc lavc -oac mp3lame -o out.avi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Index: Zend/Soap/Wsdl.php | |
=================================================================== | |
--- Zend/Soap/Wsdl.php (revision 14349) | |
+++ Zend/Soap/Wsdl.php (working copy) | |
@@ -182,12 +182,14 @@ | |
$message = $this->_dom->createElement('message'); | |
$message->setAttribute('name', $name); | |
+ $messageName = $name; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require_once "Zend/Loader.php"; | |
Zend_Loader::registerAutoload(); | |
class MyClass { | |
/** | |
* This method takes ... | |
* | |
* @param integer $inputParam | |
* @return string |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class Domain_Model_User { | |
private $id; | |
private $name; | |
} | |
interface Domain_Model_UserRepository { | |
public function save(Domain_Model_User $user); | |
public function find($id); // Returns Domain_Model_User | |
} | |
class UserService { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Example tweets, | |
// Long message http://twitter.com/johantester/status/1364993887 | |
// Normal message http://twitter.com/johantester/status/1364993866 | |
class TwitterLogWriter extends Zend_Log_Writer_Abstract { | |
private $_twitter = null; | |
public function __construct($username, $password) { | |
$this->_twitter = new Zend_Service_Twitter($username, $password); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This is a bug fix for http://github.com/johannilsson/phplifestream/commit/bec96770f848f68a48a4e20339fe13ee5f556853 that is now reverted. | |
DELETE FROM tagged_streams WHERE stream_id IN (SELECT id FROM streams WHERE unique_id = SHA1( CONCAT( content_unique_id, service_id))); | |
DELETE FROM streams WHERE unique_id = SHA1( CONCAT( content_unique_id, service_id ) ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- Zend/Tag/ItemList.php (revision 14515) | |
+++ Zend/Tag/ItemList.php (working copy) | |
@@ -83,7 +83,7 @@ | |
} | |
// Calculate the thresholds | |
- $steps = count($weightList); | |
+ $steps = count($values); | |
$delta = ($maxWeight - $minWeight) / $steps; | |
$thresholds = array(); |
OlderNewer