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
from nose.plugins import Plugin | |
class PyVersion(Plugin): | |
"""Nose plugin that excludes files based on python version and file name | |
If a filename has the format NAME.pyVERSION.py and VERSION doesn't match | |
[major][minor][micro], [major][minor] or [major] the file will be excluded | |
from tests. |
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 | |
function a { | |
return "/$1" | |
} | |
function b { | |
print $1 | |
} | |
b $(a "some_file") |
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 | |
/** Prepare a string for use with wordwrap by hyphenate words longer that $width | |
* | |
* Example: | |
* echo prep("1 12 123 1234 12345 123456 1234567 12345678", 4), PHP_EOL; | |
* Outputs: | |
* 1 12 123 123-4 123-45 123-456 123-4567 123-456-78 | |
* XXX: DO NOT USE THIS UNLESS YOU KNOW YOU CAN(See for example preg_quote()). | |
*/ | |
function prep($str, $width=72) { |
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
node default { | |
Exec { path => "/bin:/usr/bin:/usr/local/bin" } | |
exec { "apt-get update": command => "apt-get update" } | |
package {'vim': ensure=>installed, } | |
#class { 'postgresql::server': } postgresql::server::db {'pluto_development': user => 'pluto', password => postgresql_password('pluto', 'plutopass'),} |
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
{% with object.get_main_image_or_none as img %} | |
{% if img %} | |
<div class="img"> | |
<a href="{% url 'view_object' object.gid %}"><img src="{{ img.image_thumbnail.url }}"></a> | |
</div> | |
{% endif %} | |
{% endwith %} |
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 | |
interface ExportLogger { | |
function info(); | |
function debug(); | |
function warning(); | |
function error(); | |
function fatal(); | |
} |
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
abstract class ExportMessage { | |
function __construct($type, $params) { | |
$this->_type = $type; | |
$this->_params = $params; | |
} | |
function getType() { | |
return $this->_type; | |
} |
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
class NavisionSoapClient extends ExportClient { | |
} | |
class NavisionOrderFormatter extends ModelFormatter { | |
} | |
class NavisionOrderExportAdapter extends ExportAdapter { | |
} |
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
create table made_export ( | |
id int primary key, | |
type varchar(80) not null, | |
); | |
create table made_order_export ( | |
id int primary key references made_export.id, | |
order_id int references order.id, | |
); |
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 | |
[ | |
'price' => [ | |
'retail' => | |
[ | |
'USD' => [ | |
'type' => 'retail', | |
'currency' => 'USD', | |
'value' => 10, |