Skip to content

Instantly share code, notes, and snippets.

@lauromoura
lauromoura / efl_output.js
Created Aug 28, 2015
Output from efl.node
View efl_output.js
{ Ecore_Mainloop: [Function: Ecore_Mainloop],
Animator: [Function: Animator],
Exe: [Function: Exe],
Idler: [Function: Idler],
Enterer: [Function: Enterer],
Exiter: [Function: Exiter],
Job: [Function: Job],
Parent: [Function: Parent],
Poller: [Function: Poller],
Timer: [Function: Timer],
@lauromoura
lauromoura / gist:1344961
Created Nov 7, 2011
Quiz de listas do pug-pe challenge
View gist:1344961
import unittest
def search_list(data, target):
return [[i for i, d in enumerate(data) if d == t] for t in target]
class TestIt(unittest.TestCase):
def testIt(self):
self.assertEqual([[0, 2], [10], [5, 6, 7]],
search_list([1,4,1,4, 6, 5, 5, 5, 4, 2, 3], [1, 3, 5]))
View -
//Copyright (C) 2008-2014 Expersite Solutions
//
// author: Lauro Moura
// email: lauromoura@expertisesolutions.com.br
// Based on work of Larry Lira
// email: larry@expertisesolutions@gmail.com.br
function addWidget(f, parent, bx) {
var widget = new f(parent);
widget.visibility_set(true);
View main.js
//Copyright (C) 2008-2014 Expersite Solutions
//
// author: Lauro Moura
// email: lauromoura@expertisesolutions.com.br
// Based on work of Larry Lira
// email: larry@expertisesolutions@gmail.com.br
function addWidget(f, parent, bx) {
var widget = new f(parent);
widget.visibility_set(true);
View qml.pri
equals(QT_MAJOR_VERSION, 5):if(!debug_and_release|CONFIG(release, debug|release)) {
bump_qml_version_installed.CONFIG += no_path
bump_qml_version_installed.commands = test -d $$[QT_INSTALL_IMPORTS]
for(install, INSTALLS) {
isEmpty($${install}.files): next()
bump_qml_version_installed.depends += install_$${install}
bump_qml_version_installed.commands += && $$bumpQmlVersion($$eval($${install}.path), 2.0)
}
@lauromoura
lauromoura / install_root.patch
Created Feb 15, 2012
Patch qt-components to check $INSTALL_ROOT when bumping the qml files.
View install_root.patch
commit 28d31cf7a98462553e599acd0a9121bd13667eef
Author: Lauro Neto <lauro.neto@openbossa.org>
Date: Wed Feb 15 16:15:51 2012 +0100
Use INSTALL_ROOT to bump the QML files version.
When installing with INSTALL_ROOT, Makefile searched the
original path for the files to change, making the command useless.
diff --git a/qml.pri b/qml.pri
@lauromoura
lauromoura / gist:2024513
Created Mar 12, 2012
Use __arm__ to check if building for the device
View gist:2024513
diff --git a/src/main.cpp b/src/main.cpp
index 74c0cf2..9b2104d 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -58,7 +58,11 @@ int main(int argc, char** argv)
window = new BrowserWindow(arguments);
}
+#if defined(__arm__)
+ window->showFullScreen();
@lauromoura
lauromoura / main.qml
Created Mar 16, 2012
Colorizer shader
View main.qml
import QtQuick 2.0
import QtWebKit 3.0
Rectangle {
id: background
height: 480
width: 854
@lauromoura
lauromoura / gist:2127190
Created Mar 19, 2012
Rect inside WebView
View gist:2127190
import QtQuick 2.0
import QtWebKit 3.0
Rectangle {
id: background
height: 480
width: 640
color: "brown"
@lauromoura
lauromoura / gist:2161323
Created Mar 22, 2012
Random error running snowshoe mobile
View gist:2161323
ASSERTION FAILED: !m_suspendCount
/home/lauro/dev/webkit/webkit/Source/WebKit2/UIProcess/qt/QtViewportInteractionEngine.cpp(406) : void WebKit::QtViewportInteractionEngine::reset()
1 0x7f80e081beaf /home/lauro/dev/webkit/webkit/WebKitBuild/Debug/lib/libQtWebKit.so.5(_ZN6WebKit27QtViewportInteractionEngine5resetEv+0x3b) [0x7f80e081beaf]
2 0x7f80e081bf2d /home/lauro/dev/webkit/webkit/WebKitBuild/Debug/lib/libQtWebKit.so.5(_ZN6WebKit27QtViewportInteractionEngine16applyConstraintsERKNS0_11ConstraintsE+0x1d) [0x7f80e081bf2d]
3 0x7f80e073d053 /home/lauro/dev/webkit/webkit/WebKitBuild/Debug/lib/libQtWebKit.so.5(_ZN29QQuickWebViewFlickablePrivate27didChangeViewportPropertiesERKN7WebCore17ViewportArgumentsE+0x77) [0x7f80e073d053]
4 0x7f80e0811ef6 /home/lauro/dev/webkit/webkit/WebKitBuild/Debug/lib/libQtWebKit.so.5(_ZN12QtPageClient27didChangeViewportPropertiesERKN7WebCore17ViewportArgumentsE+0x36) [0x7f80e0811ef6]
5 0x7f80e07bfdc6 /home/lauro/dev/webkit/webkit/WebKitBuild/Debug/lib/libQtWebKit.so.5(_ZN6WebKi