This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PRIMARY> use test | |
PRIMARY> db.testdoc.save( { "test" : "test" } ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SECONDARY> rs.slaveOK() | |
SECONDARY> use test | |
SECONDARY> db.tetsdoc.find().count() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ tar xvf OpenCV-2.4.0.tar | |
$ cd OpenCV-2.4.0 | |
$ cmake -G "Unix Makefiles" | |
$ make | |
$ sudo make install |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// create pub-sub functionality | |
Backbone.pubSub = _.extend({}, Backbone.Events); | |
// view one needs to trigger an event in view2 | |
View1 = Backbone.View.extend({ | |
triggerView2Event : function() { | |
Backbone.pubSub.trigger('view2event', { 'some' : 'data' } ); | |
}) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
> db.stats(1024) | |
{ | |
"db" : "sqdev", | |
"collections" : 25, | |
"objects" : 31509618, | |
"avgObjSize" : 704.2919142974059, | |
"dataSize" : 21671844, | |
"storageSize" : 24783691, | |
"numExtents" : 163, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
> sudo add-apt-repository ppa:ferramroberto/java | |
> sudo apt-get update | |
> sudo apt-get -f install sun-java6-jdk | |
which tells me to run this: | |
> sudo apt-get -f install | |
> sudo apt-get install sun-java6-jdk |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys, datetime | |
from django.core.management.base import BaseCommand, CommandError | |
from optparse import make_option | |
from django.conf import settings | |
from pymongo import Connection | |
from bson.objectid import ObjectId | |
class Command(BaseCommand): | |
help = """Converts all facebook dates to MongoDate Strings So They are Query-able""" | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0"?> | |
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?> | |
<configuration> | |
<property> | |
<name>hadoop.tmp.dir</name> | |
<value>/usr/local/Cellar/hadoop/hdfs/tmp</value> | |
<description>A base for other temporary directories.</description> | |
</property> | |
<property> | |
<name>fs.default.name</name> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0"?> | |
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?> | |
<configuration> | |
<property> | |
<name>mapred.job.tracker</name> | |
<value>localhost:9010</value> | |
</property> | |
</configuration> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0"?> | |
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?> | |
<configuration> | |
<property> | |
<name>dfs.replication</name> | |
<value>1</value> | |
</property> | |
</configuration> |