Skip to content

Instantly share code, notes, and snippets.

View minimum-necessary-change's full-sized avatar

minimum-necessary-change

View GitHub Profile
@minimum-necessary-change
minimum-necessary-change / pi_wifi_check.sh
Last active December 16, 2018 12:47
Pi Wifi Monitor - Check if wifi still up but will work with any network interface and any Linux PC
#!/bin/bash
# Pi Wifi Monitor - Check if wifi still up but will work with any network interface and any Linux PC
#
# This script will periodically check if work wifi interface is still active and if not it restarts the network interface.
#
# NOTE: If your router is down then it may also appear dead!
#
# adapted from http://alexba.in/blog/2015/01/14/automatically-reconnecting-wifi-on-a-raspberrypi/
# and https://raspberrypi.stackexchange.com/questions/71626/automatically-connect-pi-zero-w-to-wlan-after-lost-connection
@minimum-necessary-change
minimum-necessary-change / CompressYUYV2JPEG.cpp
Created February 12, 2019 11:12 — forked from royshil/CompressYUYV2JPEG.cpp
Example of converting a YUYV buffer to JPEG using libJPEG
#include <iostream>
#include <fstream>
#include <vector>
#include <cstdint>
#include <memory>
#include <jpeglib.h>
using namespace std;
@minimum-necessary-change
minimum-necessary-change / log.md
Created February 19, 2019 07:32 — forked from m-jowett/log.md
Setup LibreOffice Online (Log/Guide) [WIP]

Setup LibreOffice Online (Log/Guide) [WIP]

About

This guide/log is based off my experience attempting to build and install LibreOffice Online and it's dependencies on my system.

The end goal is to get LibreOffice Online integrated with Karoshi Server.

LibreOffice Online is still in development (17/06/16).

@minimum-necessary-change
minimum-necessary-change / skiplist.c
Created February 20, 2019 15:24 — forked from icejoywoo/skiplist.c
Example of Skip List source code for C
/*
Example of Skip List source code for C:
Skip Lists are a probabilistic alternative to balanced trees, as
described in the June 1990 issue of CACM and were invented by
William Pugh in 1987.
This file contains source code to implement a dictionary using
skip lists and a test driver to test the routines.
/*
* REUK.co.uk February 2016
* Displaying two 1 or 2dp values less than 100 on a TM1638 module.
*
* An excellent starter guide to the TM1638 modules is available here:
* http://tronixstuff.com/2012/03/11/arduino-and-tm1638-led-display-modules/
*/
// include the TM1638 library (which you must first install to your Arduino IDE).
#include <TM1638.h>
/*
* REUK.co.uk - February 2016
* Useful function to test if one of the eight user input buttons
* on a TM1638 module is currently being pressed.
*/
// The byte buttons is the value returned by the TM1638 to indicate
// which buttons are currently being pressed.
byte buttons;
//==============================================================================
// ModbusRTU.cpp
//==============================================================================
/*-------------------------------------------------------------------------------
MODBUS RTU COMMUNICATION
Description:
Partial implementation of the Modbus RTU communication protocol.
@minimum-necessary-change
minimum-necessary-change / ISD1820_Voice_Recorder.ino
Created March 17, 2019 07:20
ISD1820 Arduino Voice Recorder
/*
* ISD1820 Arduino Voice Recorder
* to record and playback sound using Arduino and ISD1820 Sound Recorder
* Watch the video https://youtu.be/IfK8z_o5vbk
* get this code from http://robojax.com/learn/arduino/
/*
* ISD1820 Arduino Voice Recorder
/*
Steps:
1. Edit pcmConfig.h
a: On Uno or non-mega boards, #define buffSize 128. May need to increase.
b: Uncomment #define ENABLE_RECORDING and #define BLOCK_COUNT 10000UL
2. Usage is as below. See https://github.com/TMRh20/TMRpcm/wiki/Advanced-Features#wiki-recording-audio for
additional informaiton.
*/
/******************************************************************************
MCP4725 Example Waveform Sketch
Joel Bartlett
SparkFun Electronics
Sept. 11, 2014
https://github.com/sparkfun/MCP4725_Breakout
This sketch takes data from a lookup table to provide
waveforms to be generated by the MCP4725 DAC.