Skip to content

Instantly share code, notes, and snippets.

if [ -f /tmp/skip-only-enable-connectable-sta-mode-wifi-interface ] ; then
logger -s -t fqrouter skip-only-enable-connectable-sta-mode-wifi-interface found
return
fi
if [ "remove" == "$ACTION" -a "wlan0" == "$INTERFACE" ] ; then
/etc/init.d/disable_sta_mode_wifi_interfaces start
fi
if [ "add" == "$ACTION" -a "wlan0" == "$INTERFACE" ] ; then
logger -s -t fqrouter try to bring up sta mode wifi interface
@ianmac45
ianmac45 / qsettings-xml.hpp
Last active November 29, 2023 07:03
XML Format for QSettings
#pragma once
//TODO include appropriate headers
#include <QtCore/QtCore>
#include <QtXml/QtXml>
bool readSettingsXml(QIODevice &device, QMap<QString, QVariant> &map);
bool writeSettingsXml(QIODevice &device, const QMap<QString, QVariant> &map);
static const QSettings::Format xmlFormat = QSettings::registerFormat("xml", &readSettingsXml, &writeSettingsXml);
static const QString rootName = "config";
@jeffbryner
jeffbryner / cmdTimeout.py
Created January 25, 2014 02:15
python code to run an external command with a timeout and return the output
import fcntl
import subprocess
import sys
import shlex
from threading import Timer
import time
import os
'''
python3 code to allow one to run an external command and return the output
'''
@dhadka
dhadka / demo.ipynb
Last active March 1, 2021 14:03
Simple Platypus Demo
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@nickvandewiele
nickvandewiele / driver.py
Last active January 31, 2023 19:14
PyQT, pyqtgraph, and Cython
from pyqtgraph.Qt import QtGui, QtCore
import numpy as np
import pyqtgraph as pg
## Start Qt event loop unless running in interactive mode or using pyside.
if __name__ == '__main__':
import sys
from window import CustomWindow