This file contains hidden or 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 | |
public function getActionText() | |
{ | |
session_start(); | |
if($this->coupon_image) { | |
$action = 'view coupon'; | |
} else if($this->in_store) { | |
if($this->product_deal) { | |
$action = 'get deal'; |
This file contains hidden or 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
public function processJob($job) | |
{ | |
try { | |
// stuff | |
} catch(Exception $e) { | |
if(Offers\Model::getDb()->errno() == 2006) { | |
Offers\Model::connectDb(); | |
$this->processJob($job); | |
} else { | |
throw $e; |
This file contains hidden or 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
<html> | |
<head> | |
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css"> | |
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js"></script> | |
<!-- fill in javascript as necessary --> | |
<!-- make the characters used counter live-updating as you type --> | |
<!-- if the user tries to submit the form with more than 140 characters, display a useful error message --> | |
<script type="text/javascript"> |
This file contains hidden or 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 | |
// coercive types, as per PersonFactory author's specification | |
class ElePHPant { | |
public $name, $age, $cuteness, $evil; | |
public function __construct(~string $name, ~int $age, ~float $cuteness, ~bool $evil) { | |
$this->name = $name; | |
$this->age = $age; | |
$this->cuteness = $cuteness; | |
$this->evil = $evil; |
This file contains hidden or 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 | |
QUERY_STRING="start_debug=1&debug_host=127.0.0.1&debug_port=10137" | |
CMD_ARGS = "$@" | |
$QUERY_STRING $CMD_ARGS |
This file contains hidden or 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
---doctrine.php--- | |
<?php | |
define('APPLICATION_PATH', realpath(dirname(__FILE__) . '/../application')); | |
define('APPLICATION_ENV', (getenv('APPLICATION_ENV') ? getenv('APPLICATION_ENV') : 'production')); | |
// Ensure library/ is on include_path | |
set_include_path(implode(PATH_SEPARATOR, array( | |
realpath(APPLICATION_PATH . '/../library'), | |
get_include_path(), |
This file contains hidden or 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
[production] | |
phpSettings.display_startup_errors = 0 | |
phpSettings.display_errors = 0 | |
includePaths.library = APPLICATION_PATH "/../library" |
This file contains hidden or 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
PS1='[\u@\h \w\[\033[32m\]$(__git_ps1)\[\033[0m\]]$ ' |
This file contains hidden or 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 Genoa_Controller_Plugin_SwitchLayout extends Zend_Controller_Plugin_Abstract | |
{ | |
public function dispatchLoopStartup(Zend_Controller_Request_Abstract $request) | |
{ | |
$module = $request->getModuleName(); | |
$layoutName = $module; | |
$layoutPath = APPLICATION_PATH . "/modules/$module/views/layouts"; | |
Zend_Layout::startMvc(); | |
$layout = Zend_Layout::getMvcInstance(); |
This file contains hidden or 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
for i in $(git branch -a | grep "rc-"); do git push origin :${i#remotes/origin/}; done |
OlderNewer