Skip to content

Instantly share code, notes, and snippets.

View pinceladasdaweb's full-sized avatar
👊
The only thing I really care about is user experience.

Pedro Rogério pinceladasdaweb

👊
The only thing I really care about is user experience.
View GitHub Profile
@pinceladasdaweb
pinceladasdaweb / install-mongodb-mac-os-x.md
Created November 13, 2018 16:16 — forked from Sydney-o9/install-mongodb-mac-os-x.md
Install MongoDB on Mac OS X without brew

1. Download latest source

# Get latest from MongoDB website
$ curl -O https://fastdl.mongodb.org/osx/mongodb-osx-x86_64-3.4.6.tgz
$ tar -zxvf mongodb-osx-x86_64-3.4.6.tgz
$ mkdir -p mongodb
$ cp -R -n mongodb-osx-x86_64-3.4.6/ mongodb
$ sudo mv mongodb /usr/local
/**
* supplant() does variable substitution on the string. It scans through the string looking for
* expressions enclosed in { } braces. If an expression is found, use it as a key on the object,
* and if the key has a string value or number value, it is substituted for the bracket expression
* and it repeats.
*
* Written by Douglas Crockford
* http://www.crockford.com/
*/
String.prototype.supplant = function (o) {
// HOPED-FOR BEHAVIOR: /cats says: Cats Home
// ACTUAL BEHAVIOR: /cats says: Main Wildcard
var express = require('express');
var app = express();
app.get('/', function(req, res) {
res.send('Main Home');
})
var express = require('express');
var sys = require('util');
var oauth = require('oauth');
var app = express.createServer();
var _twitterConsumerKey = process.env['TWITTER_CONSUMER_KEY'];
var _twitterConsumerSecret = process.env['TWITTER_CONSUMER_SECRET'];
console.log("_twitterConsumerKey: %s and _twitterConsumerSecret %s", process.env['TWITTER_CONSUMER_KEY'], process.env['TWITTER_CONSUMER_SECRET']);
@pinceladasdaweb
pinceladasdaweb / robot.js
Created December 4, 2012 17:17 — forked from fabiopimentel/robot.js
CSS no Lanche
//FightCode can only understand your robot
//if its class is called Robot
var Robot = function(robot) {
};
Robot.prototype.onIdle = function(ev) {
var robot = ev.robot;
robot.clone();
robot.ahead(100);