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 Animal { | |
public function roar() { | |
echo "Makes animal sounds"; | |
} | |
} | |
trait Feline { | |
public function roar() { |
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 | |
function dbfetch() { | |
$r = mysql_query('SELECT ... '); | |
if ($r === false || mysql_num_rows($r) ==0){ | |
return null; | |
} | |
return new DBData(mysql_fetch_array($r)); |
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 | |
/** | |
* Simple Magento integration test PHPUnit bootstrap | |
*/ | |
chdir(__DIR__ . '/../..'); | |
$mageFile = 'htdocs/app/Mage.php'; | |
umask(0); |
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
configoptions=" | |
--enable-cli \ | |
--enable-debug \ | |
--enable-bcmath \ | |
--enable-calendar \ | |
--enable-exif \ | |
--enable-ftp \ | |
--enable-mbstring \ | |
--enable-pcntl \ | |
--enable-soap \ |
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
date.timezone=America/Toronto | |
memory_limit=1024M | |
include_path=".:/opt/phpfarm/inst/php-$version/pear/php/" |
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
<VirtualHost *:80> | |
ServerAdmin webmaster@localhost | |
ServerName test.mydomain.com | |
DocumentRoot /srv/www/test.mydomain.com/public_html | |
<Directory "/srv/www/cgi-bin/php-cgi-5.3.28"> | |
Require all granted | |
Allow from all | |
</Directory> | |
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
require 'httparty' | |
require 'nokogiri' | |
USERNAME = "[email protected]" | |
PASSWORD = "your-password-here" | |
COOKIE_FILE = 'cookies.txt' # by example | |
class ElixirsipsDownloader | |
FEED_URL = "https://elixirsips.dpdcart.com/feed" | |
LOGIN_URL = "http://elixirsips.dpdcart.com/subscriber/content" |
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
require Record | |
defrecord :xmlElement, Record.extract(:xmlElement, from_lib: "xmerl/include/xmerl.hrl") | |
defrecord :xmlText, Record.extract(:xmlText, from_lib: "xmerl/include/xmerl.hrl") | |
defrecord :xmlAttribute, Record.extract(:xmlAttribute, from_lib: "xmerl/include/xmerl.hrl") | |
defmodule RssParserTest do | |
use ExUnit.Case | |
def sample_xml do |
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
var BASE_URL = casper.cli.get('url'); | |
// Go to home | |
casper.test.comment('Go to home'); | |
casper.start(BASE_URL, function() { | |
this.test.pass('Home was loaded'); | |
}); | |
// Go to product list | |
casper.then(function() { |
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
require Record | |
defmodule RssParserTest do | |
Record.defrecordp :xmlElement, Record.extract(:xmlElement, from_lib: "xmerl/include/xmerl.hrl") | |
Record.defrecordp :xmlText, Record.extract(:xmlText, from_lib: "xmerl/include/xmerl.hrl") | |
Record.defrecordp :xmlAttribute, Record.extract(:xmlAttribute, from_lib: "xmerl/include/xmerl.hrl") | |
use ExUnit.Case | |
def sample_atom_xml do | |
""" |