Skip to content

Instantly share code, notes, and snippets.

@rafaelbrandao
rafaelbrandao / cucumber-tests.diff
Created April 4, 2013 07:43
This is a set of tests that I will use to handle contextual changes, i.e. given user is logged, apply data automatically on forms when possible.
diff --git a/test/cucumber/BookChapter.feature b/test/cucumber/BookChapter.feature
index 001c81d..547a3b3 100644
--- a/test/cucumber/BookChapter.feature
+++ b/test/cucumber/BookChapter.feature
@@ -31,3 +31,9 @@ Feature: BookChapter
When I select the "Book Chapter" option at the publication menu
And I select the Novo BookChapter option at the book chapter page
Then I can fill the book chapter details
+
+ Scenario: new book chapter filled with user data by default
[18:28] <othermaciej> abarth: specifically the reason I'm asking this stuff is I'm wondering if the Chrome model leads to natural memory cache sharing in the "cmd-click a same-site link" case
[18:28] <othermaciej> abarth: sounds like no
[18:29] <-- noamr has left this server (Read error: No route to host).
[18:29] <CoverSlide> does webkit have an equivalent to Firefox's "moz-chunked-arraybuffer" xhr responseType?
[18:29] <-- loislo1 has left this server (Ping timeout: 255 seconds).
[18:29] <vollick> krit, smfr: It appears that https://bugs.webkit.org/show_bug.cgi?id=108508 is causing some chromium failures. Here's one http://build.chromium.org/p/chromium.webkit/builders/WebKit%20XP%20%28deps%29/builds/3170
[18:30] --> loislo1 has joined this channel (~Adium@178.252.112.146).
[18:30] <othermaciej> abarth: I don't know if anyone but Apple will even use the third-party data blocking feature at all - we haven't tried to promote it for other ports in part because we want to ne confident that it's reasonably effect
echo "Checking summary for r$1..."
svn diff --summarize -c $1 > /tmp/patch
cat /tmp/patch | grep .$2 > /tmp/patch2
if [ $3 ]; then
cat /tmp/patch2 | grep $3 > /tmp/patch3;
mv /tmp/patch3 /tmp/patch2
fi
echo "Num of modified files (.$2): `cat /tmp/patch2 | wc -l`"
echo " * Deleted: `cat /tmp/patch2 | grep --regex='^D' | wc -l`"
echo " * Modified: `cat /tmp/patch2 | grep --regex='^M' | wc -l`"
git checkout 14635c474dfb
SCROLLING_DIR="./Source/WebCore/page/scrolling"
echo "Total files: `find $SCROLLING_DIR -type f | wc -l`"
echo "Total LOC: `find $SCROLLING_DIR -type f -exec cat '{}' \; | wc -l`"
echo " * Chromium: `find $SCROLLING_DIR/chromium/ -type f -exec cat '{}' \; | wc -l`"
echo " * Mac: `find $SCROLLING_DIR/mac/ -type f -exec cat '{}' \; | wc -l`"
PATCH_URL=$*
wget $PATCH_URL -O /tmp/patch --quiet \
&& ADDED=`cat /tmp/patch | grep ^+[^+] | wc -l` \
&& REMOVED=`cat /tmp/patch | grep ^-[^-] | wc -l` \
&& echo `expr $ADDED - $REMOVED`
@rafaelbrandao
rafaelbrandao / fix.diff
Created February 4, 2013 21:37
snowshoe needs to explicitly add an import path
diff --git a/src/desktop/BrowserWindow.cpp b/src/desktop/BrowserWindow.cpp
index ccf284e..f91a854 100644
--- a/src/desktop/BrowserWindow.cpp
+++ b/src/desktop/BrowserWindow.cpp
@@ -33,6 +33,7 @@
#include <QtQml/QQmlProperty>
#include <QtQuick/QQuickItem>
#include <QtGui/private/qguiapplication_p.h>
+#include <QDebug>
@rafaelbrandao
rafaelbrandao / .bashrc
Created January 3, 2013 05:17
Add this to .bashrc to startup automatically an scheduled task when you open terminal.
if [ `ps auxw | grep "scheduled-task.sh" | wc -l` -lt 2 ];
then
sh $HOME/scheduled-task.sh "02:10" "echo 'hello'"
fi;
@rafaelbrandao
rafaelbrandao / scheduled-task.sh
Created January 3, 2013 05:15
Example of usage: sh ./scheduled-task.sh 22:30 "echo 'hello'"
TRIGGER_TIME=$1
CMD=$2
echo "Scheduled run of \"$CMD\" at $TRIGGER_TIME..."
while :
do
NOW=`date +"%H:%M"`
if [ $NOW = $TRIGGER_TIME ]; then break; fi
sleep 30
done
$CMD
@rafaelbrandao
rafaelbrandao / files-list-diff-subset-set.cpp
Created September 25, 2012 13:58
Program to handle files subset.
#include <cstdio>
#include <cstring>
#include <set>
using namespace std;
typedef unsigned long long uint64;
const uint64 hash_base = 263;
uint64 hash(const char* s) {
@rafaelbrandao
rafaelbrandao / list-layout-tests.sh
Created September 21, 2012 21:44
List webkit layout tests that match a certain pattern.
list-webkit-tests() {
search_dir=$WK_SOURCE_DIR/LayoutTests/
echo 'Searching layout tests matching "'$*'" on '$search_dir'...';
grep -R $* -r $search_dir | grep .html | cut -f1 -d' ' | cut -f1 -d':' | uniq 2>&1;
}