Skip to content

Instantly share code, notes, and snippets.

var mongoose = require('mongoose')
, Futures = require('futures')
, Schema = mongoose.Schema
, db = mongoose.connect('mongodb://localhost/mongoose-db');
var UserSchema = new Schema({
"name": {type: String},
"location": {
"latitude": {type: Number, required: true, min: -90, max: 90},
"longitude": {type: Number, required: true, min: -180, max: 180}
@kevinmeziere
kevinmeziere / gist:1680441
Created January 26, 2012 01:58
Homer JSON Example
var person1 = {
firstName: 'Homer',
lastName: 'Simpson',
cash : 55
};
var shoppingCart = {
dougnuts: 12,
beer: 24,
cigs: 1
};
@kevinmeziere
kevinmeziere / gist:1720828
Created February 2, 2012 01:41
Tom Gould
var people =[{
firstName: 'Tom',
lastName: 'Gould',
cash : 55
},
{
firstName: 'Nadine',
lastName: 'Sigillo',
cash: 100
}];
@kevinmeziere
kevinmeziere / gist:1733307
Created February 3, 2012 22:26
Tom Gould2
var people = [{
firstName: 'Tom',
lastName: 'Gould',
cash: 55
}, {
firstName: 'Nadine',
lastName: 'Sigillo',
cash: 100
}];
@kevinmeziere
kevinmeziere / gist:1888928
Created February 23, 2012 01:09
Wednesday File
function gameLoop(willRun){
var i = 0;
while(i < 5){
console.log("looping in gameLoop");
for(var event in pendingEvents){
var curEvent = pendingEvents[event];
curEvent.call(curEvent.arguments[0]);
}
pendingEvents = null;
var variable1;
var int1 = 255;
var float1 = 3.2;
var string1 = "this is a string";
var bool1 = true;
var array1 = ["item 1", 2, 3, "item 4"];
console.log("The value of float1 is " + float1);
console.log("The fourth item in array1 is :" + array1[3]);
@kevinmeziere
kevinmeziere / zfs.sh
Last active December 28, 2015 01:49
FreeBSD 9.2 Install ZFS w/ Mirror
#!/bin/sh
#
# Calomel.org
# https://calomel.org/zfs_freebsd_root_install.html
# FreeBSD 9.2-RELEASE ZFS Root Install script
# Original file: zfs.sh @ Version 0.15
echo "# remove any old partitions on destination drives"
umount zroot
umount /mnt
svcadm disable chunter
cp /zones/DEVZONE/root/root/chunter/rel/pkg/chunter-0.6.0.gz chunter-0.6.0.gz
gunzip chunter-0.6.0.gz
rm -r chunter
sh chunter-0.6.0
sed -e '/^[^;]*distributed_cookie/s/=.*$/= \COOKIE/' -i.bak /opt/chunter/etc/chunter.conf
Node 1:
Fifo 1 (sniffle, snarl, howl, wiggle, jingles)
Leo Gateway
Node 2:
Fifo 2 (sniffle, snarl, howl, wiggle, jingles)
Leo Storage 1

Keybase proof

I hereby claim:

  • I am kevinmeziere on github.
  • I am ipalreadytaken (https://keybase.io/ipalreadytaken) on keybase.
  • I have a public key whose fingerprint is 9100 9FAF DC4B 5DFA 530D 2383 A182 2E64 C910 208F

To claim this, I am signing this object: