Skip to content

Instantly share code, notes, and snippets.

Avatar

Angelo Stavrow AngeloStavrow

View GitHub Profile
View FastShift.pde
/* FastShift Proof-Of-Concept Sketch
*
* Author: Angelo Stavrow <contact@angelostavrow.com>
* Last Updated: 6 January, 2012
*/
// Define slave select lines.
const int SS0 = 2; // Digital pin 2, slave 0
const int SS1 = 3; // Digital pin 3, slave 1
const int SS2 = 4; // Digital pin 4, slave 2
@AngeloStavrow
AngeloStavrow / clocktest.cpp
Created Jul 10, 2012
Check function execution time by calling clock()
View clocktest.cpp
// clocktest.cpp
// ClockTest
//
// Created by Angelo Stavrow on 10 July, 2012
#include <time.h>
#include "iostream"
using namespace std;
@AngeloStavrow
AngeloStavrow / BigRedButton.ino
Created Sep 18, 2015
An Arduino sketch for @Palleas' Big Red Button
View BigRedButton.ino
/* BigRedButton.ino Arduino Sketch
*
* Notes for @Palleas:
* One post of the Big Red Button should be connected to a digital
* pin, in this case pin 8, of the Arduino.
* The other post of the Big Red Button should be connected to one
* of the Arduino's GND pins.
*
* WARNING: Crosstalk or a weird power glitch _could_ send a false signal.
* It's probably a good idea to have the monitoring service on the computer
@AngeloStavrow
AngeloStavrow / HandyArduinoSnippets.ino
Last active Oct 29, 2015
Handy Arduino snippets. Obviously.
View HandyArduinoSnippets.ino
// Get the number of elements in an array.
// From Arduino FAQ:
// http://arduino.land/FAQ/content/6/29/en/how-to-get-the-size-of-an-array.html
#define elementsInArray(x) (sizeof(x) / sizeof(*x))
@AngeloStavrow
AngeloStavrow / SorryNotSorry.cs
Last active Apr 18, 2016
A handy MessageBox for displaying "not yet implemented"-type alerts in a Windows Forms application.
View SorryNotSorry.cs
private void SorryNotSorry(string title, string message)
{
MessageBox.Show(message, title);
}
@AngeloStavrow
AngeloStavrow / CalculatingHumidex.playground
Last active Sep 17, 2016
Playing with Swift 3's Units and Measurements to calculate humidex values.
View CalculatingHumidex.playground
import Foundation
// The air temperature in degrees Celsius.
var airTemperature = Measurement(value: 29.74, unit: UnitTemperature.celsius)
// The dewpoint temperature in degrees Celsius.
var dewpoint = Measurement(value: 19.08, unit: UnitTemperature.celsius)
// Calculate the humidex value.
let humidex = airTemperature.value + 0.5555 * ((6.11 * exp(5417.7530 * ((1/273.16) - (1/dewpoint.converted(to: UnitTemperature.kelvin).value)))) - 10)
View keybase.md

Keybase proof

I hereby claim:

  • I am angelostavrow on github.
  • I am astavrow (https://keybase.io/astavrow) on keybase.
  • I have a public key ASDMBIfHIOazlAtXMMP6Vd05THxMQbgKy3NdbVnxnzwGvgo

To claim this, I am signing this object:

@AngeloStavrow
AngeloStavrow / 🎏-App-to-Project
Created Dec 20, 2018
Browser bookmarklet to go from a Glitch app to its project page.
View 🎏-App-to-Project
javascript:(function()%7Bconst hostname%3Dlocation.hostname.split(%27.%27)%5B0%5D%3Blocation.href%3D%60https%3A%2F%2Fglitch.com%2F~%24%7Bhostname%7D%2F%60%3B%7D)()%3B
View subscriptions.opml
<?xml version="1.0" encoding="UTF-8"?>
<!-- OPML generated by NetNewsWire -->
<opml version="1.1">
<head>
<title>subscriptions.opml</title>
</head>
<body>
<outline text="Tuttofattoamano – Made by Hand" title="Tuttofattoamano – Made by Hand" description="" type="rss" version="RSS" htmlUrl="https://robertjeffery.us/tuttofattoamano" xmlUrl="https://robertjeffery.us/tuttofattoamano/feed/"/>
<outline text="Smashing Magazine" title="Smashing Magazine" description="" type="rss" version="RSS" htmlUrl="https://www.smashingmagazine.com/articles/" xmlUrl="https://www.smashingmagazine.com/feed/"/>
<outline text="Adactio: Journal" title="Adactio: Journal" description="" type="rss" version="RSS" htmlUrl="https://adactio.com/journal/" xmlUrl="https://adactio.com/journal/rss"/>