Skip to content

Instantly share code, notes, and snippets.

@motdotla
Last active December 28, 2015 09:09
Show Gist options
  • Save motdotla/7476379 to your computer and use it in GitHub Desktop.
Save motdotla/7476379 to your computer and use it in GitHub Desktop.
Cascadia JS Songs as Code
var askNicely = function(person, mm) {
if (person == mm) {
console.log('The real one')
}
}
var Party = function(){};
Party.prototype.run = function() {
var that = this;
if (true) {
console.log('dont stop');
this.run();
}
}
Party.prototype.start = function() {
this.run();
}
var party = new Party();
party.start();
Animal.prototype.say = function(sound) {
playSound(sound);
}
var dog = new Animal;
dog.say(“Woof”);
var cat = new Animal;
dog.say(“Meow”);
var bird = new Animal;
bird.say(“Tweet”);
var mouse = new Animal;
mouse.say(“Squeak”);
var cow = new Animal;
cow.say(“Moo”);
var frog = new Animal;
frog.say(“Ribbit”);
var fox = new Animal;
fox.say();
function() {
var someLadies = ['Erica, Jessica, Mary, Sandra'];
for(var i=0; i<someLadies.length; i++){
var lady = valueArray[i];
var alotABit = lady.length;
var doingItRight = alotABit/2;
return lady.substring(0, doingItRight);
}
}
for(i = 0; i >= children.length; i++) {
var child = children[i];
if (child.british != true) {
washington.save(child);
}
}
for(i = 1; i < 100; i++) {
if (i === 64 && needMe && feedMe) {
return true;
}
}
if (realLife || fantasy) {
for (i = 0; i < landslide + 1; i++) {
if (!reality) {
break;
}
landslide = i + 1;
}
}
var lines = [1, 2, 3, 4, 5];
for (i = 0; i <= lines.length-1; i++) {
console.log("walk " + lines[i]);
}
var person = new Person();
person.gender = 'male';
person.name = 'Sue';
var mile = 0;
var location = 'home';
do {
if (mile == 500) {
console.log('500 miles');
}
if (mile >= 1000) {
console.log('500 more');
location = 'your door';
}
mile = mile +1;
} while (location != 'your door');
var goodday = {
thankGod: true,
kindaOdd: true,
dog_barking: false,
smog: false,
mama_cooked_breakfast: true
}
var blurred = function(lines) {
for (var i = 0; i < lines.length; i++) {
console.log("Hey, Hey, Hey");
}
return true;
}
var getUp = function() {
return blurred(['|', '|', '|']);
}
Me.prototype.matters = function(you) {
if (you.color === #000 || you.color === #FFF’)
return you.thinkingAbout(this.baby);
};
var app = express();
app.get(‘/satisfaction’, function(req, res) {
res.status(404);
});
function() {
sunrise = 21600000;
function up(i) {
i++;
}
for(var night=0; night<sunrise; up(night);){
get some(i) {
return true;
}
}
}
var can = {
fake: false,
type: 'plastic',
holds: 'water',
origin: null
}
var plant = {
fake: true,
type: 'rubber',
holds: null,
origin: 'china'
}
var love1 = “love”;
var love2 = “love”;
love1 === love2;
var mySituation = [“clowns”, “me & you”, “jokers”].join(“”);
var doYouKnow = function (it) {
try {
it == ‘I Love You’;
return true;
} catch (it) {
return doYouKnow(‘I Love You’);
}
}
ExclusiveSong.prototype.reverse = function(things) {
return things.reverse();
};
ExclusiveSong.prototype.flip = function(things) {
return _.shuffle(things);
};
ExclusiveSong.prototype.worthit = function(things) {
var things = flip(things);
var put_it_down = reverse(things);
return put_it_down;
};
ExclusiveSong.prototype.hook = function(things) {
var that = this;
if (things.indexOf(‘worth it’) != -1) {
var my_thing = ['my', 'thing'];
return that.worthit(my_thing);
}
}
function make(it) {
console.log(it)
}
function chorus() {
try {
make('you and i')
} catch (e) { }
}
ComeOn.prototype.goThere = function(place) {
try {
var question = higher(me);
if (question === true) {
if (blind_men) {
place = “blind_see”;
} else {
golden_streets;
}
}
} catch () {
return false;
}
}
var with = function(they) {
if (they.run === true) {
if (they.walk === true) {
var time_in_seconds_per_day = 60*60*24;
if (they.in_sun === time_in_seconds_per_day) {
return true;
}
}
} else {
return false;
}
}
for(i=0;i<=17;i++) {
var the_word = 'Bird';
if (i % 4 === 0) {
console.log(the_word + " is the word.");
} else {
console.log(the_word);
};
}
var party = function() {
console.log(“PARTY”);
return party();
}
Me.prototype.crash = function(splashes) {
this.blown_to_hell = splashes[-1];
return this;
};
var girl = new HalfNakedGirl();
var house = new House();
var ball = new Ball();
girl.ride(ball);
ball.destroy(house);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment