Skip to content

Instantly share code, notes, and snippets.

Avatar

Ryan Cromwell cromwellryan

View GitHub Profile
View board-adafruit-io.ino
// set up the 'dadStatus' feed
AdafruitIO_Feed *dadStatus = io.feed("dad-status");
/* LED Friendly names */
const int inMeetingLed = 15;
const int headphonesOnLed = 14;
void clear() {
digitalWrite(inMeetingLed, LOW);
digitalWrite(headphonesOnLed, LOW);
@cromwellryan
cromwellryan / readme.md
Last active Oct 25, 2019
Task Forces are the model used by Sparkbox to sustain and elevate important, cross-cutting capabilities at Sparkbox. The mission of each task force is to improve, advocate for, clarify, and evolve aspects of our development capabilities through training, tooling, documentation, discovery, thought leadership, and mentoring.
View readme.md

Each task force has a mission that guides their planning, decision making, and efforts.

Accessibility Task Force

The Web Accessibility Taskforce develops resources to prepare our team to implement accessibility not as an à la carte feature but as an important consideration in our workflow.

Apprentice Roundtable

Producing advanced beginners who are ready to contribute on real, team web projects.

Build and Tooling Task Force

Improve Sparkbox project setup, builds, and tooling.

View async-test.js
var assert = require('assert');
function failHard() {
return new Promise((resolve, reject) => {
reject('Failed promise!');
});
}
async function failHardAsync() {
throw new Error('Crap!');
View code.gs
//This script will allow you to make a whole lot of
//copies of a document in your Google Drive.
//If the original is in a folder, then the copies will be made
//in the same folder
//be careful of what you change. Each semicolon is very important.
function copyDocs() {
var activeDocument = DocumentApp.getActiveDocument();
var fileId = activeDocument.getId();
View promises-function-only.js
/* Wes' original example is great, but we've found the following
* example of https://github.com/wesbos/Web-App-Workshop/blob/master/notes/02%20-%20Promises.md
* to read really well and keep us from putting too much in our `then` functions.
*/
const logError = (err) => console.log('Something Happened!', err);
getTheWeatherFor('Dayton')
.then(getPicturesOfWeather)
.then(resizePicturesOfWeather)
.then(uploadNewPictures)
View index.js
class Person {
constructor(firstName, lastName) {
this.firstName = firstName;
this.lastName = lastName;
}
display() {
return `${this.firstName} ${this.lastName}`;
}
}
View rating.rb
ruby -e "p Random.rand(10)"
@cromwellryan
cromwellryan / README.md
Last active Sep 13, 2017
2017-09-13 Dayton Clean Coders
View README.md

OWASP Top 10

  • A1-Injection
  • A2-Broken Authentication and Session Management
  • A3-Cross-Site Scripting (XSS)
  • A4-Broken Access Control
  • A5-Security Misconfiguration
  • A6-Sensitive Data Exposure
  • A7-Insufficient Attack Protection
  • A8-Cross-Site Request Forgery (CSRF)
View index.js
/* npm install promise */
const Promise = require('promise');
function within(time) {
return new Promise(function (fulfill) {
setTimeout(fulfill, time);
});
}
function timeout(promise, milliseconds) {
You can’t perform that action at this time.