-
Training document https://training.plone.org/5/#
-
owner
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/cake bake fixture -r -n 30 --table customers --conditions "datakubun = '9'" Customers2 |
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
unload mysql57-server | |
load mysql56-server | |
/opt/local/lib/mysql56/mysqldump | |
/opt/local/lib/mysql56/mysql |
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
# -*- coding: utf-8 -*- | |
import datetime | |
import time | |
fmt = '%Y-%m-%d %H:%M' | |
add = datetime.timedelta(minutes=1) | |
start = datetime.datetime(2016, 12, 30, 17, 0, 0) | |
while(1) : | |
a = start.strftime(fmt) |
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 | |
START_DATE="20160101" | |
END_DATE="20160401" | |
echo ${START_DATE}" - "${END_DATE} | |
#DATE=${START_DATE} | |
#echo ${DATE} | |
#DATE=`date -j -f %Y%m%d -v+1d ${DATE} +%Y%m%d` |
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 | |
START_DATE="20150801" | |
END_DATE="20150826" | |
echo ${START_DATE}; | |
echo ${END_DATE} | |
for (( DATE=${START_DATE}; ${DATE} < ${END_DATE}; DATE=`date -d "${DATE} 1 day" '+%Y%m%d'` )) ; do | |
echo ${DATE} | |
DATE2=`date -d "${DATE}" '+%Y-%m-%d'` |
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 | |
use Behat\MinkExtension\Context\RawMinkContext; | |
/** | |
* Add Popup in Context | |
*/ | |
class Popup extends RawMinkContext | |
{ | |
/** |
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 | |
require 'vendor/autoload.php'; | |
use Carbon\Carbon; | |
echo '-- add sub 1 months --', PHP_EOL; | |
$dt1 = Carbon::createFromDate(2011, 1, 31); | |
echo $dt1->toDateString(), PHP_EOL; | |
echo $dt1->addMonth()->toDateString(), PHP_EOL; |
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 | |
/** | |
* @url http://scriptworks.jp/blog/2011/12/how_to_avoid_pitfall_of_php_datetime/ | |
*/ | |
require 'vendor/autoload.php'; | |
use Cake\Chronos\Date; | |
$today = new Date('2011-01-31'); | |
echo $today . PHP_EOL; | |
echo $today->modify('+1 months') . PHP_EOL; |
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 | |
require 'vendor/autoload.php'; | |
use Cake\Chronos\Chronos; | |
printf("Now: %s" . PHP_EOL, Chronos::now()); | |
use Cake\Chronos\Date; | |
$today = new Date(); |
NewerOlder