Skip to content

Instantly share code, notes, and snippets.

Ryan Cromwell cromwellryan

Block or report user

Report or block cromwellryan

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
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!');
//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
* to read really well and keep us from putting too much in our `then` functions.
const logError = (err) => console.log('Something Happened!', err);
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 /
Last active Sep 13, 2017
2017-09-13 Dayton Clean Coders

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) {
cromwellryan /
Last active Jul 12, 2017
2017-07-12 Dayton Clean Coders

Test Driven Development

This page:

Pager Kata

The kata is about the writing of the underlying data model for a pager control (NOT about the presentation). What you should create is an object or class (bunch of classes?!) which is smart enough to provide all the data required to actually render the links to pages.

cromwellryan /
Last active Apr 12, 2017
DCC 2017-04-12

Linting and Static Analysis tools or TDD like you mean it

You can’t perform that action at this time.