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
{ | |
"title": "Mobile Dashboard", | |
"services": { | |
"query": { | |
"list": { | |
"0": { | |
"id": 0, | |
"color": "#82B5D8", | |
"alias": "lb*", | |
"pin": true, |
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 'abstract.php'; | |
class Djv_Shell_AppLog extends Mage_Shell_Abstract | |
{ | |
const DEFAULT_SOURCE_FILE = 'system.log'; | |
const LOG_LINE_REGEX = "/^(?P<date>\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}([+-]\d{2}:\d{2})?)\b\s*\b(?P<errcode>[A-Z]+)\b\s\((?P<errno>\d)\):\s*(?P<message>.*?)(\s+in\s(?P<file>[^\s]+)\s+on\sline\s(?<line>\d+))?$/"; | |
/** |
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: app/controllers/Pabel.php | |
* Class Pabel | |
*/ | |
class Pabel | |
{ | |
/** | |
* @return void | |
*/ |
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 Foo | |
{ | |
/**#@+ | |
* @var string | |
*/ | |
public $hello = "Hello"; | |
protected $world = "World"; | |
private $exclam = "!"; |
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 | |
$in = 100; $out = 200; | |
$s = microtime(true); | |
for ($i=0; $i<1000000; $i++) { | |
echo $in.'<br>'.$out; | |
} | |
$e = microtime(true); | |
echo PHP_EOL.PHP_EOL.sprintf("CONCAT (1,000,000) : %s", number_format($e-$s, 6)).PHP_EOL; |
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 | |
$in = 100; $out = 200; | |
$s = microtime(true); | |
for ($i=0; $i<1000000; $i++) { | |
echo $in,'<br>',$out; | |
} | |
$e = microtime(true); | |
echo PHP_EOL.PHP_EOL.sprintf("COMMA (1,000,000) : %s", number_format($e-$s, 6)).PHP_EOL; |
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 $popupIncrement = 1; ?> | |
<?php while ($objectResult) : ?> | |
<tr> | |
<td> | |
<div class="popup" onclick="myFunction(<?php echo $popupIncrement; ?>); return false;"> | |
<img src="" /> | |
</div> | |
<span class="popuptext" id="myPopup<?php echo $popupIncrement; ?>">Trigger<span> | |
</td> | |
</tr> |
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 | |
function pretRefuseAccord($age, $salaire) | |
{ | |
switch (true) { | |
case $age >= 30 && $salaire < 20000 : | |
case $age > 40 && $salaire < 35000 : | |
case $age > 50 && $salaire < 50000 : | |
$return = true; | |
break; |
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
#!/bin/bash | |
echo "Searching for class overrides" | |
echo "" | |
# echo "= Mage_Admin_Helper_Data" | |
# grep "extends Mage_Admin_Helper_Data" ./app/code/{community,local} -Rl | |
# echo "" | |
echo "= Mage_Admin_Model_Block" | |
grep "extends Mage_Admin_Model_Block" ./app/code/{community,local} -Rl | xargs grep "function validate(" | |
echo "" |
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 | |
// https://www.facebook.com/groups/2204685680/permalink/10156550592900681/ | |
// These are your inputs | |
$str1 = "We all go to college"; | |
$str2 = "We all go to temple"; | |
// Create array of lowercase versions of the words | |
// Lowercase to allow our diff to not get caught up in case sensitivity | |
$ar1 = array_filter(array_map('trim', explode(' ', strtolower($str1)))); |
NewerOlder