Skip to content

Instantly share code, notes, and snippets.

View jonathanmaron's full-sized avatar

Jonathan Maron jonathanmaron

View GitHub Profile
FILENAME=/var/www/gitorious/app/snapshots/gitorious-$(date +%Y%m%d%H%M%S).tar.gz
cd /var/www/gitorious/app/
bin/snapshot $FILENAME
{
"minimum-stability" : "dev",
"name": "landing.example.com",
"require": {
"php" : ">=5.3.3",
"zendframework/zendframework" : "2.2.5",
"example/Customer" : "dev-master"
},
# strip comments
cat package.xml | sed '/<!--.*-->/d' | sed '/<!--/,/-->/d' > package.tmp.xml
# clean XML file
xmllint package.tmp.xml --format --encode utf-8 | unexpand -t2 | expand -t4 > package.clean.xml
# replace original file
<?php
use TxTextControl\ReportingCloud\ReportingCloud;
$reportingCloud = new ReportingCloud([
'api_key' => Helper::apiKey(),
]);
var_dump($reportingCloud->getTemplateList());
array(2) {
[0] =>
array(3) {
'template_name' =>
string(17) "sample_invoice.tx"
'modified' =>
int(1464691594)
'size' =>
int(34859)
}
<?php
use TxTextControl\ReportingCloud\ReportingCloud;
$reportingCloud = new ReportingCloud([
'api_key' => Helper::apiKey(),
]);
var_dump($reportingCloud->deleteTemplate('sample_invoice.tx'));
<?php
use TxTextControl\ReportingCloud\ReportingCloud;
$reportingCloud = new ReportingCloud([
'api_key' => Helper::apiKey(),
]);
$templateName = 'sample_invoice.tx';
string(59) "sample_invoice.tx was written to /tmp/sample_invoice_p0.png"
<?php
use TxTextControl\ReportingCloud\ReportingCloud;
$reportingCloud = new ReportingCloud([
'api_key' => Helper::apiKey(),
]);
var_dump($reportingCloud->getTemplateCount());