Skip to content

Instantly share code, notes, and snippets.

View robUx4's full-sized avatar

Steve Lhomme robUx4

View GitHub Profile
@robUx4
robUx4 / gist:f75448aa675d9baaab9015e9c9649318
Last active December 27, 2019 13:59
full log, adding a device after deinstalling deconz add-on and reboot
2019-12-27 14:51:07 DEBUG (MainThread) [zigpy_deconz.uart] Connection made
2019-12-27 14:51:09 DEBUG (MainThread) [zigpy.appdb] Loading application state from /config/zigbee.db
2019-12-27 14:51:09 DEBUG (MainThread) [zigpy.quirks.registry] Checking quirks for None None (00:21:2e:ff:ff:04:81:f2)
2019-12-27 14:51:09 DEBUG (MainThread) [zigpy.quirks.registry] Considering <class 'zigpy.quirks.smartthings.SmartthingsMultiPurposeSensor'>
2019-12-27 14:51:09 DEBUG (MainThread) [zigpy.quirks.registry] Fail because endpoint list mismatch: {1} {80, 1}
2019-12-27 14:51:09 DEBUG (MainThread) [zigpy.quirks.registry] Considering <class 'bellows.zigbee.application.EZSPCoordinator'>
2019-12-27 14:51:09 DEBUG (MainThread) [zigpy.quirks.registry] Fail because endpoint list mismatch: {1} {80, 1}
2019-12-27 14:51:09 DEBUG (MainThread) [zigpy.quirks.registry] Considering <class 'zhaquirks.gledopto.soposhgu10.SoposhGU10'>
2019-12-27 14:51:09 DEBUG (MainThread) [zigpy.quirks.registry] Fail because endpoint list mismatch: {11, 13} {
@robUx4
robUx4 / gist:1bb8fc594a7f09e52956
Created March 10, 2015 15:05
mingw netoapi.h fail in VLC
In file included from ../../../work/extras/package/win32/../../../include/vlc_common.h:43:0,
from ../../../work/extras/package/win32/../../../modules/services_discovery/upnp.hpp:34,
from ../../../work/extras/package/win32/../../../modules/services_discovery/upnp.cpp:35:
C:/msys64/mingw32/i686-w64-mingw32/include/stdlib.h:346:36: error: conflicting declaration of C function 'int atoi(const char*)'
int __cdecl atoi(const char *_Str);
^
In file included from ../config.h:815:0,
from ../../../work/extras/package/win32/../../../modules/services_discovery/upnp.cpp:32:
../../../work/extras/package/win32/../../../include/vlc_fixups.h:304:34: note: previous declaration 'NET_IFINDEX atoi(PCSTR)'
# define if_nametoindex(name) atoi(name)
@robUx4
robUx4 / alloca.patch
Created September 26, 2018 14:56
vla MSVC issues
From 72c81fbfa53838a9594137b582b10d99ff385141 Mon Sep 17 00:00:00 2001
From: Steve Lhomme <robux4@ycbcr.xyz>
Date: Wed, 26 Sep 2018 16:54:27 +0200
Subject: [PATCH] WIP use _alloca() with MSVC
---
src/cdef.c | 4 ++++
src/ipred.c | 3 +++
src/itx.c | 6 ++++++
src/looprestoration.c | 33 +++++++++++++++++++++++++++++++++
@robUx4
robUx4 / ecc-eddsa.c
Created June 21, 2018 09:22
line 146
/* Make sure that the opaque MPI VALUE is in compact EdDSA format.
This function updates MPI if needed. */
gpg_err_code_t
_gcry_ecc_eddsa_ensure_compact (gcry_mpi_t value, unsigned int nbits)
{
gpg_err_code_t rc;
const unsigned char *buf;
unsigned int rawmpilen;
gcry_mpi_t x, y;
unsigned char *enc;
@robUx4
robUx4 / bdj.c
Created March 8, 2017 13:12
libbluray LoadLibraryEx
static void *_load_dll(const wchar_t *lib_path, const wchar_t *dll_search_path)
{
void *result;
PVOID WINAPI (*pAddDllDirectory) (PCWSTR);
BOOL WINAPI (*pRemoveDllDirectory)(PVOID);
pAddDllDirectory = (__typeof__(pAddDllDirectory)) GetProcAddress(GetModuleHandle(TEXT("kernel32.dll")), "AddDllDirectory");
pRemoveDllDirectory = (__typeof__(pRemoveDllDirectory)) GetProcAddress(GetModuleHandle(TEXT("kernel32.dll")), "RemoveDllDirectory");
if (pAddDllDirectory && pRemoveDllDirectory) {
<intent-filter>
<action android:name="android.intent.action.PACKAGE_CHANGED" />
<data
android:host="com.levelup.touiteur"
android:scheme="package" />
</intent-filter>
@robUx4
robUx4 / FragmentCursor.java
Last active January 6, 2016 17:05
Basic SwipeRefreshLayout support in ListFragment, you get support for an empty view in ListFragment. You need to set an OnRefreshListener and call setRefreshing()
import org.gawst.proxy.ui.SwipeListFragment;
import android.content.Context;
import android.database.Cursor;
import android.os.Bundle;
import android.support.v4.app.LoaderManager.LoaderCallbacks;
import android.support.v4.content.Loader;
import android.support.v4.widget.CursorAdapter;
import android.support.v4.widget.SwipeRefreshLayout;
import android.view.View;
@robUx4
robUx4 / gist:8052193
Created December 20, 2013 08:59
Avoid Webview's to crash when the activity is gone
mv.setWebChromeClient(new WebChromeClient() {
@Override
public boolean onCreateWindow(WebView view, boolean isDialog, boolean isUserGesture, Message resultMsg) {
if (getActivity()==null || !view.getWindowToken().isBinderAlive()) {
TouiteurLog.d(false, "pretend we will create a window but it's not possible anymore");
return true;
}
return super.onCreateWindow(view, isDialog, isUserGesture, resultMsg);
}
@robUx4
robUx4 / gist:8036041
Created December 19, 2013 08:19
You're trying too hard
try {
mWindowManager.addView(mDecor, l);
mShowing = true;
sendShowMessage();
} finally {
}
@robUx4
robUx4 / gist:7543300
Last active December 28, 2015 18:29
OrientationDrawable: a Drawable that handles orientation changes without allocating anything updated with a fix when a Matrix is already applied in the canvas
/*
* Copyright (C) 2013 LevelUp Studio
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software