Skip to content

Instantly share code, notes, and snippets.

@TheBigSadowski
TheBigSadowski / README.md
Last active December 24, 2015 15:08
TDD Pig Latin Building out a pig latin translator step by step using test driven development.

#TDD Pig Latin

A translator from English to Pig Latin, written javascript.

Running the tests

Tests run from the command line using node. If you don't have node, you can get it [here](http://nodejs.org/ here).

Run the tests:

@TheBigSadowski
TheBigSadowski / anon.js
Last active April 27, 2021 11:18
Random IP address generator for anonymizing data.
randomByte = function() {
return Math.round(Math.random()*256);
}
randomIp = function() {
var ip = randomByte() +'.' +
randomByte() +'.' +
randomByte() +'.' +
randomByte();
if (isPrivate(ip)) return randomIp();