Skip to content

Instantly share code, notes, and snippets.

View hpsaturn's full-sized avatar
🏠
Working from home

hpsaturn

🏠
Working from home
View GitHub Profile
import zmq
import time
import driver_pb2 as driver_proto
creator_ip = '127.0.0.1' # or local ip of MATRIX creator
creator_gpio_base_port = 20013 + 36
context = zmq.Context()
socket = context.socket(zmq.PUSH)
@hpsaturn
hpsaturn / asoundrc
Last active October 5, 2017 04:39
MATRIX Creator software installation and ALSA config for mic 0. (For Alexa Amazon service)
pcm.!default
{
type asym
playback.pcm {
type hw
card 0
device 0
}
capture.pcm {
type file
@hpsaturn
hpsaturn / Pressure.java
Created December 21, 2016 17:43
Google Things parser
public class Pressure extends SensorBase {
private static final String TAG = Pressure.class.getSimpleName();
private static final boolean DEBUG = Config.DEBUG;
private float altitude;
private float pressure;
private float temperature;
public Pressure(Wishbone wb) {
"syntax on
"colorscheme murphy
set nocompatible " Use Vim defaults (much better!)
set bs=2 " Allow backspacing over everything in insert mode
set autoindent " Always set auto-indenting on
set smartindent
set ruler " Add bar information
set backup " Keep a backup file
set backupdir=$HOME/vimbackups
#include <unistd.h>
#include <iostream>
#include <sys/types.h>
#include <ifaddrs.h>
#include <netinet/in.h>
#include <string.h>
#include <cstring>
#include <arpa/inet.h>
#include "../cpp/driver/everloop_image.h"
#!/bin/sh
###################################################################
# Load hotspot
# 2009-2010 Hpsaturn v1.0
# hpsaturn@gmail.com
#
# REV000: Creación de funciones iniciales. Mode Ad-Hoc soportado
###################################################################
DEVICE=wlan0
@hpsaturn
hpsaturn / connect
Last active May 13, 2022 01:03
Bash wireless connect
#! /bin/sh
###################################################################
# WPA Connect
# 2009-2015 Hpsaturn v1.3
# hpsaturn@gmail.com
#
# Archivos de configuracion:
# deben ser creados con wpa_passphrase en $CPATH previamente
# y deben tener de prefijo: wpa_ y sufijo .conf, por ej:
# wpa_casa.conf
@hpsaturn
hpsaturn / MailGunBasicSendMail.java
Last active April 2, 2020 17:10
Send Mail basic implementation via MailGun API and Retrofit for Android
import android.util.Base64;
import com.google.gson.Gson;
import com.hpsaturn.robotsanta.Config;
import com.hpsaturn.robotsanta.models.MailGunResponse;
import retrofit.Callback;
import retrofit.RestAdapter;
import retrofit.converter.GsonConverter;
import retrofit.http.Field;