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
/** | |
* Weekdays between dates | |
* | |
* Works out the number of weekdays between two dates. | |
* @param DateTime $objStartDate The start date | |
* @param DateTime $objEndDate The end date | |
* @return int The number of weekdays or -1 if end date is before start date. | |
*/ | |
function weekdaysBetweenDates(DateTime $objStartDate, DateTime $objEndDate){ | |
//set the time of the day to the same values since we only care about days |
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
alley => alley, aly | |
aly => alley, aly | |
annex => annex, anx | |
anx => annex, anx | |
apartment => apartment, apt | |
apt => apartment, apt | |
arc => arc, arcade | |
arcade => arc, arcade | |
ave => ave, avenue | |
avenue => ave, avenue |
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
# | |
# /etc/monit/conf.d/puppetserver | |
# Monit file for puppetserver | |
# | |
check process puppetserver with pidfile /var/run/puppetlabs/puppetserver/puppetserver.pid | |
start program "/usr/bin/service puppetserver start" with timeout 120 seconds | |
stop program "/usr/bin/service puppetserver stop" with timeout 120 seconds | |
if failed port 8140 with timeout 30 seconds and retry 3 times 3 times within 3 cycles then restart | |
if 5 restarts within 5 cycles then timeout |
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
# | |
# /etc/monit/conf.d/beanstalkd | |
# | |
check process beanstalkd with pidfile /var/run/beanstalkd.pid | |
start "/usr/bin/service beanstalkd start" | |
stop "/usr/bin/service beanstalkd stop" | |
if failed port 11300 | |
send "stats\r\n" | |
expect "OK [0-9]{1,}\r\n" |
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
# | |
# /etc/monit/conf.d/memcached | |
# | |
check process memcached with pidfile /var/run/memcached.pid | |
group memcache | |
start program = "/usr/bin/service memcached start" | |
stop program = "/usr/bin/service memcached stop" | |
if failed host 127.0.0.1 port 11211 protocol MEMCACHE then restart | |
if 5 restarts within 5 cycles then timeout |
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
urlpatterns = [ | |
url(r'^reset_password/(?P<uidb64>[0-9A-Za-z_\-]+)/(?P<token>[0-9A-Za-z]{1,13}-[0-9A-Za-z]{1,20})/$', | |
views.reset_password, name='reset_password'), | |
] |
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
urlpatterns = [ | |
url(r'^reset_password/(?P<uidb64>[0-9A-Za-z_\-]+)/' | |
r'(?P<token>[0-9A-Za-z]{1,13}-[0-9A-Za-z]{1,20})/$', | |
views.reset_password, name='reset_password'), | |
] |
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
[tox] | |
envlist = assets, flake8, py35 | |
[tox:jenkins] | |
envlist = flake8, py35 |
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
<exec dir="${basedir}/src/" executable="/usr/bin/tox" failonerror="true"> | |
<arg line="-e environment -- --option=1 --option2=2"/> | |
</exec> |
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
<exec dir="${basedir}/src/" executable="/usr/bin/tox" failonerror="true"> | |
<arg line="-e py35 -- tests/unit --cov=./ --cov-report=xml --junitxml=junit-unit.xml --cov-append"/> | |
</exec> | |
<exec dir="${basedir}/src/" executable="/usr/bin/tox" failonerror="true"> | |
<arg line="-e py35 -- tests/functional --cov=./ --cov-report=xml --junitxml=junit-unit.xml --cov-append"/> | |
</exec> |
OlderNewer