Skip to content

Instantly share code, notes, and snippets.

View scottgreenup's full-sized avatar
🏠
Working from home

Scott Greenup scottgreenup

🏠
Working from home
View GitHub Profile
@scottgreenup
scottgreenup / pr-template.md
Created June 26, 2018 13:24
A Random PR Template I've Started Following

What Did I Do?

Describe what you achieved in this PR

How Did I Do It?

  • List the changes you made and why you made them

Sneaky Extras

Keybase proof

I hereby claim:

  • I am scottgreenup on github.
  • I am scottgreenup (https://keybase.io/scottgreenup) on keybase.
  • I have a public key whose fingerprint is BCE5 4EE3 C08E 2D00 CC65 85E9 3BE4 8322 2BC0 CF9F

To claim this, I am signing this object:

@scottgreenup
scottgreenup / randomValue.js
Created December 7, 2017 00:00
Possible random value generator
const crypto = require('crypto')
/**
* Generates an evenly distributed random number.
* Basically, keep performing rounds until we have one champion. Each round a
* random number is generated for every remaining character in choices. If the
* random number is a maximum, those characters go onto the next round, until
* there is only one maximum left.
*/
@scottgreenup
scottgreenup / promises.js
Created October 10, 2017 00:39
ES6 Promise Example
/*
$ node promises.js
1: Hello
2: Hello, world
3: Hello, world. I am a Promise.
4: Error: REJECTION!
*/
const assert = require('assert')
@scottgreenup
scottgreenup / .eslintrc.js
Created October 10, 2017 00:15
.eslintrc.js example
module.exports = {
'extends': 'google',
'parserOptions': {
'ecmaVersion': 6,
},
'rules': {
// https://eslint.org/docs/rules/array-bracket-spacing
'array-bracket-spacing': ['error', 'never'],