- Download the recent version: http://www.mongodb.org/downloads
- Copy everything to a folder (I used
C:\tools\mongodb
) - Add
C:\tools\mongodb\bin
to yourPATH
variable - Open Commandline and cd to
C:\tools\mongodb
mkdir data\db && mkdir log
echo logpath=C:\tools\mongodb\log\mongo.log > C:\tools\mongodb\mongod.cfg
echo dbpath=C:\tools\mongodb\data\db >> C:\tools\mongodb\mongod.cfg
C:\mongodb\bin\mongod.exe --config C:\mongodb\mongod.cfg --install
net start mongodb
- That's it. You're done!
This file contains 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
Because I'm always struggling, a note for myself (and for others) how it works. | |
Installing PHP PECL IMagick on Ubuntu: | |
-------------------------------------- | |
1. $ sudo aptitude install php-pear imagemagick php5-dev libmagick9-dev | |
2. $ sudo pecl install Imagick | |
3. $ sudo nano /etc/php5/apache2/php.ini | |
4. enter extension=imagick.so -> save (ctrl+x / Y) | |
5. $ sudo apache2ctl configtest |
This file contains 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
var app = require('express').createServer(), | |
fs = require('fs'), | |
geolib = require('./geolib').geolib, | |
http = require('http'); | |
app.get('/distance/:lat1/:lng1/:lat2/:lng2', function(req, res){ | |
var distance = geolib.getDistance({latitude: req.params.lat1, longitude: req.params.lng1 }, {latitude: req.params.lat2, longitude: req.params.lng2}); | |
res.send('Distance from ' + req.params.lat1 + ',' + req.params.lng1 + ' to ' + req.params.lat2 + ',' + req.params.lng2 + ' is ' + distance + ' km'); | |
}); |
This file contains 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 apt-get install python-software-properties | |
sudo add-apt-repository ppa:chris-lea/node.js | |
sudo apt-get update | |
sudo apt-get install nodejs npm | |
https://github.com/joyent/node/wiki/Installing-Node.js-via-package-manager |
This file contains 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
@echo off | |
NET SESSION >nul 2>&1 | |
IF %ERRORLEVEL% NEQ 0 ( | |
echo This setup needs admin permissions. Please run this file as admin. | |
pause | |
exit | |
) | |
set NODE_VER=null |
This file contains 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
javascript:(function() { var v = document.querySelector("meta[name=viewport]"); var vc = v.content; if(!!vc.match('user-scalable')) { var as = vc.replace(/user-scalable\s*=\s*no/,'user-scalable=yes'); } else { var as = vc + ',user-scalable=yes'; } if(!!vc.match(/maximum-scale/)) { as = as.replace(/(,?)\s*maximum-scale\s*=\s*(.*)/,'$1maximum-scale=3') } else { as += ',maximum-scale=3'; } v.content = as; })(); |
This file contains 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
1. Download the recent version from nodejs.org | |
2. Run `msiexec /qn /l* node-log.txt /i node-vX.X.XX-x64.msi` |
This file contains 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
function foo() { | |
var _private = function() { | |
return 'myPrivateFunction'; | |
}; | |
return { | |
foobar: function() { | |
return 'foobar' + _private(); |
This file contains 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
/*! document.getElementsByStyle() | |
* | |
* Returns an array (not a NodeList!!) containing all elements matching certain | |
* computed style rules. | |
* | |
* Usage: | |
* var blockElements = document.getElementsByStyle('display: block'); | |
* | |
* PS: I know it might not be the best idea to extend HTMLElement/HTMLDocument since it | |
* returns an array not a NodeList (like getElementsByTagName). But I recommend to use |
This file contains 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
// ---- | |
// Sass (v3.4.9) | |
// Compass (v1.0.1) | |
// ---- | |
@mixin font-headline($type, $color: "") { | |
@if $type == h1 { | |
$font-size-headline: 28; | |
} @else if $type == h2 { |
OlderNewer