Skip to content

Instantly share code, notes, and snippets.

@saintedlama
Last active September 28, 2015 17:15
Show Gist options
  • Save saintedlama/c12aba2c897a42304b53 to your computer and use it in GitHub Desktop.
Save saintedlama/c12aba2c897a42304b53 to your computer and use it in GitHub Desktop.
conn = new Mongo();
db = conn.getDB("products");
db.products.remove({});
db.products.insert([{
name : 'iphone6',
manufacturer: 'apple',
qty : 40,
tags : ['hipster', 'ios', 'slick', '3dtouch'],
awards : [{
name : 'Bad Privacy Award',
organization : 'FSF'
}],
specs : {
processor : 'apple thingy',
ram : 2000,
resolution : {
w: 3000,
h : 4000
}
}
}, {
name : 'iphone6s',
manufacturer: 'apple',
qty : 400,
tags : ['hipster', 'ios', 'slick'],
awards : [{
name : 'Bad Privacy Award',
organization : 'FSF'
}],
specs : {
processor : 'apple thingy',
ram : 2000,
resolution : {
w: 2000,
h : 3000
}
}
}, {
name : 'iphone5s',
manufacturer: 'apple',
qty : 4,
tags : ['ios'],
awards : [{
name : 'Bad Privacy Award',
organization : 'FSF'
}],
specs : {
processor : 'apple thingy',
ram : 1000,
resolution : {
w: 1000,
h : 2000
}
}
}, {
name : 'nexus6',
manufacturer: 'google',
qty : 60,
tags : ['android', 'google', 'nsa'],
awards : [{
name : 'Bad Privacy Award',
organization : 'FSF'
}],
specs : {
processor : 'ARM',
ram : 4000,
resolution : {
w: 2000,
h : 2000
}
}
}, {
name : 'lumina1520',
manufacturer: 'microsoft',
qty : 1000,
tags : ['microsoft', 'windows', 'noapps'],
awards : [{
name : 'Bad Privacy Award',
organization : 'FSF'
}],
specs : {
processor : 'ARM',
ram : 1000,
resolution : {
w: 4000,
h : 4000
}
}
}, {
name : 'one',
manufacturer: 'htc',
qty : 10,
tags : ['android', 'old', 'badbattery'],
awards : [{
name : 'Bad Privacy Award',
organization : 'FSF'
}],
specs : {
processor : 'ARM',
ram : 2000,
resolution : {
w: 2000,
h : 2000
}
}
}, {
name : 'one',
manufacturer: 'oneplus',
qty : 1,
tags : ['hardtoget', 'huge', 'verhuge', 'damnhuge'],
awards : [{
name : 'Bad Privacy Award',
organization : 'FSF'
}],
specs : {
processor : 'ARM',
ram : 6000,
resolution : {
w: 4000,
h : 4000
}
}
}, {
name : 'priv',
manufacturer: 'blackberry',
qty : 10000,
tags : ['android', 'nonsa', 'privacy'],
awards : [{
name : 'Privacy Award',
organization : 'FSF'
}],
specs : {
processor : 'ARM',
ram : 2000,
resolution : {
w: 4000,
h : 4000
}
}
}]);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment