sudo apt-get update
sudo apt-get upgrade
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 | |
define( 'DOING_AJAX', true ); | |
define( 'WP_ADMIN', true ); | |
define( 'WP_IMPORTING', true ); | |
$err = array(); | |
/** Load WordPress Bootstrap */ | |
require_once '../../../../wp-load.php'; |
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 | |
# | |
# Find the "5 days" in this code | |
# and change it to whatever you want | |
# | |
tmpfile=$(tempfile) | |
for D in $(ls -1); do |
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 SudoObject | |
{ | |
/** | |
* @var object | |
*/ | |
private $instance; | |
/** |
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 | |
// text | |
$fieldset->addField('title', 'text', array( | |
'label' => Mage::helper('form')->__('Title3'), | |
'class' => 'required-entry', | |
'required' => true, | |
'name' => 'title', | |
'onclick' => "alert('on click');", | |
'onchange' => "alert('on change');", |
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
# Sexy Bash Prompt, inspired by "Extravagant Zsh Prompt" | |
# Screenshot: http://cloud.gf3.ca/M5rG | |
# A big thanks to \amethyst on Freenode | |
if [[ $COLORTERM = gnome-* && $TERM = xterm ]] && infocmp gnome-256color >/dev/null 2>&1; then export TERM=gnome-256color | |
elif [[ $TERM != dumb ]] && infocmp xterm-256color >/dev/null 2>&1; then export TERM=xterm-256color | |
fi | |
if tput setaf 1 &> /dev/null; then | |
if [[ $(tput colors) -ge 256 ]] 2>/dev/null; then |
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 | |
namespace Foo\Domain\Wallet; | |
use Foo\Domain\RepositoryInterface; | |
use Foo\Domain\Wallet; | |
interface WalletRepositoryInterface extends RepositoryInterface | |
{ |
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 | |
// some might like this as 'deploy:clean', most have 'cleanup' | |
$clean_hook = 'cleanup'; | |
// assume wp cli is in the repo via composer | |
// change this to the path of your wp executable | |
set( 'wpcli_command', 'vendor/bin/wp' ); | |
function deployer_wp_cli( $command ) { |
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 | |
namespace Crmp\AccountingBundle\Form; | |
use Crmp\AccountingBundle\Entity\DeliveryTicket; | |
use Crmp\AccountingBundle\Entity\Invoice; | |
use Crmp\AcquisitionBundle\Entity\Contract; | |
use Symfony\Bridge\Doctrine\Form\Type\EntityType; | |
use Symfony\Component\Form\AbstractType; | |
use Symfony\Component\Form\Extension\Core\Type\NumberType; |
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 | |
// make the url "/register/index" and "/register" available | |
class Register_Controller extends Abstract_Controller { | |
public function index_action() { | |
wp_die( 'You can register here' ); | |
} | |
} |
NewerOlder