Skip to content

Instantly share code, notes, and snippets.

View jonathanmaron's full-sized avatar

Jonathan Maron jonathanmaron

View GitHub Profile
<?php
use TxTextControl\ReportingCloud\ReportingCloud;
$reportingCloud = new ReportingCloud([
'api_key' => Helper::apiKey(),
]);
$templateName = 'sample_invoice.tx';
<?php
use TxTextControl\ReportingCloud\ReportingCloud;
$reportingCloud = new ReportingCloud([
'api_key' => Helper::apiKey(),
]);
var_dump($reportingCloud->deleteTemplate('sample_invoice.tx'));
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->getTemplateList());
# 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
{
"minimum-stability" : "dev",
"name": "landing.example.com",
"require": {
"php" : ">=5.3.3",
"zendframework/zendframework" : "2.2.5",
"example/Customer" : "dev-master"
},
FILENAME=/var/www/gitorious/app/snapshots/gitorious-$(date +%Y%m%d%H%M%S).tar.gz
cd /var/www/gitorious/app/
bin/snapshot $FILENAME
[root@git src]# git clone https://git.gitorious.org/gitorious/ce-installer.git && cd ce-installer
Initialized empty Git repository in /usr/src/ce-installer/.git/
remote: Counting objects: 995, done
remote: Finding sources: 100% (995/995)
remote: Compressing objects: 100% (827/827)
remote: Compressing objects: 100% (827/827)
Receiving objects: 100% (995/995), 149.98 KiB, done.
Resolving deltas: 100% (620/620), done.
[root@git ce-installer]# ./install
// this works
'service_manager' => array(
'factories' => array(
'navigation' => function() {
$navigation = new \Application\Navigation\Navigation(
include __DIR__ . '/../navigation/navigation.php');
return $navigation;
}
),