Skip to content

Instantly share code, notes, and snippets.

View rwinscot's full-sized avatar

Rick Winscot rwinscot

View GitHub Profile
@rwinscot
rwinscot / gpg.md
Last active January 21, 2022 18:30 — forked from LauLaman/gpg.md
Use GPG to Sign Commits
@rwinscot
rwinscot / dropbox_uploader.sh
Last active January 2, 2019 22:33
Bashing the Dropbox API
#!/usr/bin/env bash
#
# Dropbox Uploader
# https://github.com/andreafabrizi/Dropbox-Uploader
#
# Copyright (C) 2010-2017 Andrea Fabrizi <andrea.fabrizi@gmail.com>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
@rwinscot
rwinscot / UbiquitiUtils.cs
Created November 26, 2018 20:45
UNMS Ubiquiti Device Discovery
using System;
using System.Net;
using System.Net.Sockets;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
namespace UbiquityUtils
{
@rwinscot
rwinscot / Screenshot404.js
Created May 23, 2018 14:29
Screenshot HTTP 404 ( not found )
// NodeJS v8.11.1
// Puppeteer v1.4.0
// https://github.com/GoogleChrome/puppeteer/tree/v1.4.0
const browser = await puppeteer.launch();
const page = await browser.newPage();
page.on('console', msg => {
if (msg.type() == 'error' && msg.text().indexOf('404') >= 0) {
@rwinscot
rwinscot / WebsiteFastExtract.js
Created May 17, 2018 13:59
Google Chrome Headless with Puppeteer: Loading Website Extract Quickly
// NodeJS v8.11.1
// Puppeteer v1.4.0
// https://github.com/GoogleChrome/puppeteer/tree/v1.4.0
const browser = await puppeteer.launch();
const page = await browser.newPage();
await page.setRequestInterception(true);
page.on('request', (request) => {
// trick here... is to ignore everything but the document
@rwinscot
rwinscot / guacamole-installing-dependencies
Created March 6, 2017 05:08 — forked from sionc/guacamole-installing-dependencies
Installing dependencies for Guacamole
Installing dependencies
----------------------------
The following steps need to be performed only once in order to install dependencies:
Cairo is a 2D graphics library with support for multiple output devices.
$ sudo apt-get install libcairo2-dev
libtool
$ sudo apt-get install libtool
automake
@rwinscot
rwinscot / Robo_Face_Mouth.ino
Created September 3, 2013 04:14
Expands on the Robo_Face.ino sketch by adding a NeoPixel Stick for the mouth. Animation is based on a time-slice rather than delays.
// Based on the 'roboface' example sketch for Adafruit I2C 8x8 LED
// backpacks:
//
// www.adafruit.com/products/870 www.adafruit.com/products/1049
// www.adafruit.com/products/871 www.adafruit.com/products/1050
// www.adafruit.com/products/872 www.adafruit.com/products/1051
// www.adafruit.com/products/959 www.adafruit.com/products/1052
//
// And the NeoPixel Stick...
//
@rwinscot
rwinscot / Robo_Eyes.ino
Created September 3, 2013 03:57
Adafruit 8x8 LED Matrix eye animation based on milis slice rather than using delay.
// Based on the 'roboface' example sketch for Adafruit I2C 8x8 LED
// backpacks:
//
// www.adafruit.com/products/870 www.adafruit.com/products/1049
// www.adafruit.com/products/871 www.adafruit.com/products/1050
// www.adafruit.com/products/872 www.adafruit.com/products/1051
// www.adafruit.com/products/959 www.adafruit.com/products/1052
//
// Requires Adafruit_LEDBackpack and Adafruit_GFX libraries.
// For a simpler introduction, see the 'matrix8x8' example.
@rwinscot
rwinscot / Millis_Slice.ino
Created August 10, 2013 12:10
If you're new to Arduino, you might not realize just how badly delays can impact performance. When (not if) you run into problems associated with delay - the Googles might have you believe that a library is the answer to your problems. It can help... but may not be necessary. Consider the following approach as an alternative.
byte LED = 13; // debug LED on the Arduino
byte blnk = 0; // variable used to track LED flip-flop
unsigned long tme = 0; // the last time we processed doBlink()
unsigned long slc = 500; // milliseconds between doBlink() calls
unsigned long ms = 0; // a millis() time-slice
void setup() {
pinMode( LED, OUTPUT );// set Arduino LED as output - for to blink
}
@rwinscot
rwinscot / DEV_10587_Sample_01.ino
Created December 18, 2011 05:12
Sketch to drive the SparkFun Music Instrument Shield (VS1053 MP3 and MIDI codec IC) from an Arduino UNO.
/**
* Author: Rick Winscot, Nathan Seidle
* Copyright: PUBLIC DOMAIN ( Beerware License )
*
* Hardware: Arduino UNO R3
* SparkFun Musical Instrument Shield ( http://www.sparkfun.com/products/10587 )
*
* IDE: Arduino 1.0 ( http://arduino.cc/en/Main/Software )
*
* Original sketch by Nathan Seidle on 2-12-2011. Transmogrified by Rick Winscot on 17-12-2011