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 | |
# hook into inotify to watch a file, and generate | |
# diffs for changes in real-time | |
# | |
# requires inotify-tools (apt-get install inotify-tools) | |
# | |
# @author Filipe Dobreira <[email protected]> | |
usage() { | |
echo "Usage:" | |
echo " in-diff <file>|help" |
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
{ | |
// . . . | |
"scripts": { | |
"post-install-cmd": [ | |
// NOTE: cwd is the location of the composer.json | |
// -t/--batch (supress interactivity) | |
"patch -t -p0 < path/to/file.patch" | |
] | |
} | |
// . . . |
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 | |
$content = $this->api->getContentToUpdate( | |
$this->api->getContentInfoByPath( '/Date-and-Time-Test-Object' ) | |
); | |
try { | |
$newData = new DateTime( '31-09-2012 12:00 am' ); // 31-09-2012 12:00 am | |
$content->setField( 'date_time', $newData ); |