Skip to content

Instantly share code, notes, and snippets.

void SparkVariable::callFinished(QJsonDocument json) {
if (json.isNull()) goto cleanup;
if (! json.isObject()) { qDebug() << "expected a json object"; goto cleanup; }
QJsonObject jo = json.object();
if (jo.isEmpty()) { qDebug() << "json object is empty"; goto cleanup; }
QJsonValue return_value = jo["return_value "];
QVariant value = return_value.toVariant();
qDebug() << "a function from " << m_variable << " returned " << return_value;
class SparkCloud : public QObject
{
Q_OBJECT
public:
explicit SparkCloud(QUrl apiurl, QObject *parent = 0);
explicit SparkCloud(QObject *parent = 0);
Q_INVOKABLE QList<QObject*> devices() { return (QList<QObject*>)(m_devices.values()); }
Q_INVOKABLE QList<QString> device_ids() { return m_devices.keys(); }
Q_INVOKABLE SparkDevice* device(QString id) { return m_devices[id]; }
#include "application.h"
// Define the pins we're going to call pinMode on
int PIR_PIN = D0;
int BUTTON_PIN = D1;
int DOOR_PIN = D2;
int LOCK_PIN = D3; // Note that on zuul this pin seems not to do INPUT_PULLDOWN
int DOORBELL_PIN = D4;
int LED_PIN = D7; // This one is the built-in tiny one to the right of the USB jack
///////////////////////////////////////////////////////// PIR
Login with ldap:false
Started POST "/users/sign_in" for 127.0.0.1 at 2013-04-01 15:53:12 +0000
Processing by Devise::SessionsController#create as HTML
Parameters: {"utf8"=>"�", "authenticity_token"=>"=", "user"=>{"login"=>"admin@local.host", "password"=>"[FILTERED]", "remember_me"=>"0"}}
Redirected to http://gldev.in.merproject.org/
Completed 302 Found in 140ms (ActiveRecord: 0.0ms)
Started GET "/" for 127.0.0.1 at 2013-04-01 15:53:12 +0000
Processing by DashboardController#show as HTML
Rendered dashboard/_zero_authorized_projects.html.haml (2.0ms)
Provides: libmozalloc.so libnspr4.so libplc4.so libplds4.so libxul.so pkgconfig(libxul) = 22.0a1 pkgconfig(libxul-embedding) = 22.0a1 pkgconfig(mozilla-js) = 22.0a1 pkgconfig(mozilla-nspr) = 4.9.6 pkgconfig(mozilla-nss) = 22.0a1 pkgconfig(mozilla-plugin) = 22.0a1
Requires(rpmlib): rpmlib(CompressedFileNames) <= 3.0.4-1 rpmlib(PayloadFilesHavePrefix) <= 4.0-1
Requires: /bin/sh /usr/bin/pkg-config ld-linux-armhf.so.3 ld-linux-armhf.so.3(GLIBC_2.4) libQtCore.so.4 libQtGui.so.4 libQtNetwork.so.4 libQtOpenGL.so.4 libX11.so.6 libXext.so.6 libXrender.so.1 libasound.so.2 libasound.so.2(ALSA_0.9) libasound.so.2(ALSA_0.9.0rc4) libc.so.6 libc.so.6(GLIBC_2.4) libc.so.6(GLIBC_2.7) libcairo.so.2 libdbus-1.so.3 libdbus-glib-1.so.2 libdl.so.2 libdl.so.2(GLIBC_2.4) libfontconfig.so.1 libfreetype.so.6 libgcc_s.so.1 libgcc_s.so.1(GCC_3.0) libgcc_s.so.1(GCC_3.4) libgcc_s.so.1(GCC_3.5) libgcc_s.so.1(GCC_4.3.0) libglib-2.0.so.0 libgmodule-2.0.so.0 libgobject-2.0.so.0 libgstapp-0.10.so.0 libgstbase-0.10.so.0 libgstreamer-0.10.so.0
#!/bin/bash
TIMEOUT=10
DEV=eth0
cnt=0
echo waiting for IP
while (( $cnt < $TIMEOUT )); do
IP=$(/sbin/ip -4 addr show dev $DEV scope global | grep "inet" | cut -f6 -d' ' | cut -f1 -d'/' )
[[ $IP ]] && break
10.110.0.59: rebooting...
starting worker 179d88baa3f3ee4302461a7af4c3255c build d41d8cd98f00b204e9800998ecf8427e
fetching new buildcode 3570140b895991fa995bd6b9f56d83ab, mine was d41d8cd98f00b204e9800998ecf8427e
got job, run build...
2012-10-13 13:45:00: building 'qt' for project 'Core:i586' repository 'Core_i586' arch 'i586' using helper linux32
fetching sources, dbe289f63cb79da8a4dfcb9bff402dff for Makefile
7b0a51adf261eae52a1da238b487bd76 for assistant.desktop
a2ce1bf6f751fdb5a4977f31edc602c6 for assistant.png
7add31d9c8f9312263a4d5e9e9fae0b2 for designer.desktop
bfa39ba23a96a2455466fa51d8269ddf for designer.png
Walkthrough for Powertop
========================
First we create an osc package for this package.
Go to a suitable OBS directory with Mer_Core_i486 or similar as a repo target.
Now create the package:
# -*-mic2-options-*- --arch=i486 -*-mic2-options-*-
#
# Do not Edit! Generated by:
# kickstarter.py
#
lang en_US.UTF-8
keyboard us
timezone --utc UTC
part / --size 1000 --ondisk sda --fstype=ext4
cycle: dbus-libs -> dbus -> systemd
breaking dependency systemd -> dbus-libs
cycle: nss -> nss-sysinit
breaking dependency nss-sysinit -> nss
cycle: rpm-libs -> rpm
breaking dependency rpm -> rpm-libs
done
booting XEN kernel ...
linux64 xm create -c /var/tmp/build.xen.conf-FTlBJ810l name=build_4 disk=file:/var/cache/obs/worker/root_4/root,hda1,w disk=file:/var/cache/obs/worker/root_4/swap,hda2,w extra=quiet init=/.build/initscript_qemu_vm elevator=noop panic=1 console=ttyS0 rw
Using config file "/var/tmp/build.xen.conf-FTlBJ810l".