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 | |
$str[] = ':jamie_h!~textual@72.32.115.231 PRIVMSG #test_channel :test message'; | |
$str[] = ':jamie_h!~textual@72.32.115.231 PRIVMSG #test_channel :fii message'; | |
$str[] = ':jamie_h!~textual@72.32.115.231 PRIVMSG #test_channel :foo message'; | |
$str[] = ':jamie_h!~textual@72.32.115.231 PRIVMSG #test_channel :message test boo'; | |
$str[] = ':jamie_h!~textual@72.32.115.231 PRIVMSG #test_channel :blaat fii message'; | |
foreach($str as $s) { | |
preg_match('/:([^!]+)[^:]+:(.*(test|fii).*)/', $s, $matches); |
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
### Keybase proof | |
I hereby claim: | |
* I am rianorie on github. | |
* I am rianorie (https://keybase.io/rianorie) on keybase. | |
* I have a public key whose fingerprint is FEA7 7567 EAF8 F36E 80FF B936 DE26 8EB7 E328 E148 | |
To claim this, I am signing this object: |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE MudletPackage> | |
<MudletPackage version="1.0"> | |
<TriggerPackage> | |
<TriggerGroup isActive="yes" isFolder="yes" isTempTrigger="no" isMultiline="no" isPerlSlashGOption="no" isColorizerTrigger="no" isFilterTrigger="no" isSoundTrigger="no" isColorTrigger="no" isColorTriggerFg="no" isColorTriggerBg="no"> | |
<name>demo</name> | |
<script></script> | |
<triggerType>0</triggerType> | |
<conditonLineDelta>0</conditonLineDelta> | |
<mStayOpen>0</mStayOpen> |
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 | |
$n = 6; | |
$k = 3; | |
$squads = 0; | |
$pattern = 'R??L?R'; | |
$curse = ''; | |
for($i = 0; $i < $k; $i++) { $curse .= 'R'; } |
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 | |
include(__DIR__.'/../app/Mage.php'); | |
Mage::app(); | |
$s = microtime(true); | |
var_dump( Mage::getStoreConfig('test/test/test') ); |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<config> | |
<sections> | |
<payment> | |
<groups> | |
<foggyline_stripe translate="label" module="pay"> | |
<label>Foggyline Stripe</label> | |
<tab>Sales</tab> | |
<frontend_type>text</frontend_type> |
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
$options[] = array( | |
'title' => 'Extra informatie', | |
'comment' => '', | |
'type' => 'area', | |
'is_require' => 0, | |
'sort_order' => 8, | |
'is_delete' => '', | |
'previous_type' => '', | |
'previous_group' => '', | |
'price' => '0.00', |
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 | |
set_time_limit(5); | |
ini_set('max_execution_time', 5); | |
function shutdown() | |
{ | |
// This is our shutdown function, in | |
// here we can do any last operations | |
// before the script is complete. |
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 | |
$data = strtolower(trim($data)); | |
if ( ! strlen($data)) { // "" | |
$r = ''; | |
} elseif (is_numeric($data) || is_bool($data)) { // "0" "1" 0 1 false true | |
$r = ((bool)intval($data) ? 'Yes' : 'No'); |
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 // file [project]/Library/View.php | |
namespace YourNamespace\Library; | |
class extendedView extends \Phalcon\Mvc\View | |
{ | |
public function getPartial($path, $params = array()) | |
{ | |
ob_start(); | |
$this->partial($path, $params); | |
return ob_get_clean(); |
OlderNewer