Skip to content

Instantly share code, notes, and snippets.

View sobreira's full-sized avatar

Edson Sidnei Sobreira sobreira

View GitHub Profile
// #define HC_05
#ifdef HC_05
// Arduino + HC_05 altserial
#define SERIAL_BAUD 19200
#include "AltSoftSerial.h"
AltSoftSerial altSerial;
#define MySerial altSerial
#else
// BLE NANO
@sobreira
sobreira / how-to-get-scratch-2.0-air-offline.md
Created March 25, 2019 11:37 — forked from 2E0PGS/how-to-get-scratch-2.0-air-offline.md
How to get scratch 2 offline in adobe air on Ubuntu Linux

How to get scratch 2 offline in adobe air on Ubuntu Linux

Donload the adobe air installer:

wget http://drive.noobslab.com/data/apps/AdobeAir/adobe-air.sh

Make the installer executable:

chmod +x adobe-air.sh

@sobreira
sobreira / build-static-python.sh
Created January 21, 2019 08:39 — forked from maddouri/build-static-python.sh
A simple script that builds static versions of Python and LibPython using musl-libc
#!/bin/bash
# set -eux
# This a simple script that builds static versions of Python and LibPython using musl-libc
# Find the associated article at: http://general-purpose.io/2015/12/06/compiling-python-and-libpython-statically-using-musl-libc/
WORKING_DIR="/code/static-python"
MUSL_PREFIX="/code/static-python/musl"
PY_PREFIX="/code/static-python/python"
# install necesary i386 libraries
$ sudo apt-get install libgtk2.0-0:i386 libstdc++6:i386 libxml2:i386 libxslt1.1:i386 libcanberra-gtk-module:i386 gtk2-engines-murrine:i386 libqt4-qt3support:i386 libgnome-keyring0:i386 libnss-mdns:i386 libnss3:i386
# make keyring visible for Adobe Air
$ sudo ln -s /usr/lib/i386-linux-gnu/libgnome-keyring.so.0 /usr/lib/libgnome-keyring.so.0
$ sudo ln -s /usr/lib/i386-linux-gnu/libgnome-keyring.so.0.2.0 /usr/lib/libgnome-keyring.so.0.2.0
# Download Adobe Air
cd ~/Downloads
wget http://airdownload.adobe.com/air/lin/download/2.6/AdobeAIRSDK.tbz2
#!/usr/bin/env python
"""
- read subprocess output without threads using Tkinter
- show the output in the GUI
- stop subprocess on a button press
"""
import logging
import os
import sys
from subprocess import Popen, PIPE, STDOUT