Skip to content

Instantly share code, notes, and snippets.

View cromwellryan's full-sized avatar

Ryan Cromwell cromwellryan

View GitHub Profile
//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();
/* 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)
class Person {
constructor(firstName, lastName) {
this.firstName = firstName;
this.lastName = lastName;
}
display() {
return `${this.firstName} ${this.lastName}`;
}
}
ruby -e "p Random.rand(10)"
@cromwellryan
cromwellryan / README.md
Last active September 13, 2017 15:46
2017-09-13 Dayton Clean Coders
  • 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)
/* npm install promise */
const Promise = require('promise');
function within(time) {
return new Promise(function (fulfill) {
setTimeout(fulfill, time);
});
}
function timeout(promise, milliseconds) {
@cromwellryan
cromwellryan / README.md
Last active July 12, 2017 15:44
2017-07-12 Dayton Clean Coders
@cromwellryan
cromwellryan / README.md
Last active April 12, 2017 15:17
DCC 2017-04-12

Linting and Static Analysis tools or TDD like you mean it

@cromwellryan
cromwellryan / TALKS.md
Last active March 8, 2017 16:44
Dayton Clean Coders 2017-03-08 Lightning Talks