Skip to content

Instantly share code, notes, and snippets.

@renan
renan / default.json
Last active December 24, 2015 09:39
{
"run_list": [
"recipe[nginx]"
],
"default_attributes": {
"nginx": {
"dir" : "/etc/nginx",
"log_dir" : "/var/log/nginx",
"binary" : "/usr/sbin/nginx",
"user" : "www-data",
diff --git a/lib/Cake/Utility/String.php b/lib/Cake/Utility/String.php
index f6d9bf4..aea9421 100644
--- a/lib/Cake/Utility/String.php
+++ b/lib/Cake/Utility/String.php
@@ -358,25 +358,20 @@ class String {
* @return string Formatted text.
*/
public static function wordWrap($text, $width = 72, $break = "\n", $cut = false) {
- $widthAndBoundary = $cut ? '{' . $width . '}#' : '{' . $width . ',}\b#U';
- $regexp = '#^(?:[\x00-\x7F]|[\xC0-\xFF][\x80-\xBF]+)' . $widthAndBoundary;
This file has been truncated, but you can view the full file.
make[2]: Entering directory `/pdf/wkhtmltopdf-qt/src/3rdparty/webkit/Source/WebKit/qt/tests'
cd qwebframe/ && make -f Makefile.WebKit
cd qwebpage/ && make -f Makefile.WebKit
cd qwebelement/ && make -f Makefile.WebKit
make[3]: Entering directory `/pdf/wkhtmltopdf-qt/src/3rdparty/webkit/Source/WebKit/qt/tests/qwebelement'
g++ -Wl,-rpath-link,/pdf/wkhtmltopdf-qt/lib -m64 -Wl,-O1 -Wl,-rpath,/pdf/wkhtmltopdf-qt/src/3rdparty/webkit/Source/lib -Wl,-rpath,/pdf/wkqt/lib -Wl,-rpath,/pdf/wkqt/lib -o tst_qwebelement .obj/release-static/tst_qwebelement.o .obj/release-static/qrc_tst_qwebelement.o -L/pdf/wkhtmltopdf-qt/lib -L/usr/X11R6/lib64 -L/pdf/wkhtmltopdf-qt/lib -lQtWebKit -L../../WebCore/release -L../../JavaScriptCore/release -L/usr/X11R6/lib64 -lwebcore -ljscore -lgio-2.0 -lgstapp-0.10 -lgstinterfaces-0.10 -lgstpbutils-0.10 -pthread -lgstvideo-0.10 -lgstbase-0.10 -lgstreamer-0.10 -lgobject-2.0 -lgmodule-2.0 -lgthread-2.0 -lxml2 -lglib-2.0 -lQtTest -lQtGui -lXrender -lfontconfig -lfreetype -lXext -lX11 -lQtNetwork
@renan
renan / gist:6698775
Last active December 23, 2015 21:49
language: php
php:
- 5.3
- 5.4
- 5.5
env:
global:
- CAKE_VERSION=2.5
diff --git a/webroot/index.php b/webroot/index.php
index 6c071ac..f77be14 100644
--- a/webroot/index.php
+++ b/webroot/index.php
@@ -22,6 +22,10 @@
// for built-in server
if (php_sapi_name() === 'cli-server') {
$_SERVER['PHP_SELF'] = '/' . basename(__FILE__);
+
+ if (file_exists(__DIR__ . $_SERVER['REQUEST_URI'])) {
[Mon Sep 16 13:38:48] ~/Sites/cakephp
renan@hephaestus ➜ composer create-project --stability=dev cakephp/app new-app
Warning: This development build of composer is over 30 days old. It is recommended to update it by running "/usr/local/bin/composer self-update" to get the latest version.
Installing cakephp/app (dev-master 9dc8489bc35193057109ebe511975669bec52165)
- Installing cakephp/app (dev-master master)
Cloning master
Created project in new-app
Loading composer repositories with package information
Installing dependencies (including require-dev)
$tz = new DateTimeZone('Europe/Amsterdam');
$dt = new DateTime('20:00', $tz);
echo $dt->format('c'); // 2013-08-21T20:00:00+02:00
diff --git a/lib/Cake/Console/Templates/default/actions/controller_actions.ctp b/lib/Cake/Console/Templates/default/actions/controller_actions.ctp
index e3df021..8f02af2 100644
--- a/lib/Cake/Console/Templates/default/actions/controller_actions.ctp
+++ b/lib/Cake/Console/Templates/default/actions/controller_actions.ctp
@@ -55,14 +55,12 @@
$this-><?php echo $currentModelName; ?>->create();
if ($this-><?php echo $currentModelName; ?>->save($this->request->data)) {
<?php if ($wannaUseSession): ?>
- $this->Session->setFlash(__('The <?php echo strtolower($singularHumanName); ?> has been saved'));
+ $this->Session->setFlash(__('The <?php echo strtolower($singularHumanName); ?> has been saved.'));
diff --git a/lib/Cake/Network/Email/SmtpTransport.php b/lib/Cake/Network/Email/SmtpTransport.php
index 363e477..ec48d6c 100644
--- a/lib/Cake/Network/Email/SmtpTransport.php
+++ b/lib/Cake/Network/Email/SmtpTransport.php
@@ -145,7 +145,10 @@ class SmtpTransport extends AbstractTransport {
* @throws SocketException
*/
protected function _sendRcpt() {
- $from = $this->_cakeEmail->from();
+ $from = $this->_cakeEmail->returnPath();
@renan
renan / gist:5270437
Last active December 15, 2015 13:49
diff --git a/lib/Cake/Test/Case/View/Helper/HtmlHelperTest.php b/lib/Cake/Test/Case/View/Helper/HtmlHelperTest.php
index b54e4d5..316c618 100644
--- a/lib/Cake/Test/Case/View/Helper/HtmlHelperTest.php
+++ b/lib/Cake/Test/Case/View/Helper/HtmlHelperTest.php
@@ -605,6 +605,22 @@ class HtmlHelperTest extends CakeTestCase {
}
/**
+ * testCssWithFullBase method
+ *