Skip to content

Instantly share code, notes, and snippets.

@lauromoura
lauromoura / efl_output.js
Created August 28, 2015 19:40
Output from efl.node
{ 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 November 7, 2011 13:29
Quiz de listas do pug-pe challenge
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]))
@lauromoura
lauromoura / -
Created September 28, 2015 20:22
//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);
//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);
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 February 15, 2012 15:22
Patch qt-components to check $INSTALL_ROOT when bumping the qml files.
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 March 12, 2012 20:31
Use __arm__ to check if building for the device
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 March 16, 2012 19:03
Colorizer shader
import QtQuick 2.0
import QtWebKit 3.0
Rectangle {
id: background
height: 480
width: 854
@lauromoura
lauromoura / gist:2127190
Created March 19, 2012 21:21
Rect inside WebView
import QtQuick 2.0
import QtWebKit 3.0
Rectangle {
id: background
height: 480
width: 640
color: "brown"
@lauromoura
lauromoura / gist:2161323
Created March 22, 2012 18:23
Random error running snowshoe mobile
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